diff options
author | Javier Marín <javier@marinros.com> | 2020-09-15 03:47:26 +0300 |
---|---|---|
committer | Bruce Wells <brucekwells@gmail.com> | 2020-09-16 04:14:44 +0300 |
commit | 8fc77e54e01be2bfc6c2d5938fcd7735d4c9b3dd (patch) | |
tree | 752ca6f1602526ce36e38b289f2bb54630c4a0e3 /src/NXP/MathExecutor.php | |
parent | 8a2cae984f77ed55195bed071b12a165fa532561 (diff) |
Improved support for null variables (#72)
* Added handler to define not found variables
Added support for string variables
Fixed strings and ints comparison error
* Check if variables have scalar types (int, float, string and bool)
Better $onVarNotFound logic
* Better support for null variables
* Better support for null variables
* Better support for null variables
Diffstat (limited to 'src/NXP/MathExecutor.php')
-rw-r--r-- | src/NXP/MathExecutor.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/NXP/MathExecutor.php b/src/NXP/MathExecutor.php index 434246a..f45335c 100644 --- a/src/NXP/MathExecutor.php +++ b/src/NXP/MathExecutor.php @@ -416,7 +416,7 @@ class MathExecutor */ public function getVar(string $variable) { - if (!isset($this->variables[$variable])) { + if (!array_key_exists($variable, $this->variables)) { throw new UnknownVariableException("Variable ({$variable}) not set"); } return $this->variables[$variable]; |