diff options
author | Alexander Kiryukhin <alexander@kiryukhin.su> | 2018-09-06 20:41:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-06 20:41:13 +0300 |
commit | 7b657db13f0b76432ca0039e45f4b8f5e09879c2 (patch) | |
tree | 954c50f2644212742442e0027efb081620d2a109 /src/NXP/Classes/Token/TokenDivision.php | |
parent | a969571772a9761f67672b229741f209f5391560 (diff) | |
parent | aa1a092a9e231e8f923ab40365dff092c2908903 (diff) |
Merge branch 'master' into dev
Diffstat (limited to 'src/NXP/Classes/Token/TokenDivision.php')
-rw-r--r-- | src/NXP/Classes/Token/TokenDivision.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/NXP/Classes/Token/TokenDivision.php b/src/NXP/Classes/Token/TokenDivision.php index 479a4ec..f1c35ff 100644 --- a/src/NXP/Classes/Token/TokenDivision.php +++ b/src/NXP/Classes/Token/TokenDivision.php @@ -47,7 +47,7 @@ class TokenDivision extends AbstractOperator { $op2 = array_pop($stack); $op1 = array_pop($stack); - $result = $op1->getValue() / $op2->getValue(); + $result = $op2->getValue() != 0 ? $op1->getValue() / $op2->getValue() : 0; return new TokenNumber($result); } |