diff options
Diffstat (limited to 'src/NXP/Classes/Calculator.php')
-rw-r--r-- | src/NXP/Classes/Calculator.php | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/NXP/Classes/Calculator.php b/src/NXP/Classes/Calculator.php index 49142df..4785a8f 100644 --- a/src/NXP/Classes/Calculator.php +++ b/src/NXP/Classes/Calculator.php @@ -64,9 +64,7 @@ class Calculator $value = $variables[$variable]; } elseif ($onVarNotFound) { $value = call_user_func($onVarNotFound, $variable); - } - - if (!isset($value)) { + } else { throw new UnknownVariableException($variable); } |