aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/Classes/Calculator.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/NXP/Classes/Calculator.php')
-rw-r--r--src/NXP/Classes/Calculator.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/NXP/Classes/Calculator.php b/src/NXP/Classes/Calculator.php
index bfa7015..253e70c 100644
--- a/src/NXP/Classes/Calculator.php
+++ b/src/NXP/Classes/Calculator.php
@@ -54,7 +54,7 @@ class Calculator
}
}
$result = array_pop($stack);
- if (!empty($stack)) {
+ if ($result === null || ! empty($stack)) {
throw new IncorrectExpressionException();
}