Skip to content

Commit

Permalink
fix array to string conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Ackermann committed Jan 13, 2020
1 parent dad30f3 commit b776561
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/MathParser/Math.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ private function assertVariablesAreNumbersOrNull(array $variables)
private function assertVariableIsNumberOrNull($variable)
{
if (!is_int($variable) && !is_float($variable) && !($variable === null)) {
throw new \InvalidArgumentException('provided variable is not a number or null. found: ' . $variable);
throw new \InvalidArgumentException('provided variable is not a number or null. found: ' .
gettype($variable));
}
}
}

0 comments on commit b776561

Please sign in to comment.