aboutsummaryrefslogtreecommitdiff
path: root/src/NXP/MathExecutor.php
diff options
context:
space:
mode:
authorJavier Marín <javier@marinros.com>2020-09-15 03:47:26 +0300
committerGitHub <noreply@github.com>2020-09-15 03:47:26 +0300
commitf8faf3fa8d21ebd6e6f8c73f022eb64e407dc6e1 (patch)
tree752ca6f1602526ce36e38b289f2bb54630c4a0e3 /src/NXP/MathExecutor.php
parent44d72cc252974ac36cc138591aac785022760a50 (diff)
Improved support for null variables (#72)V2.1.2
* 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.php2
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];