Skip to content

Commit

Permalink
Fixed issue: Fatal error when using unary operator on empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Aug 17, 2021
1 parent 6b8bb14 commit cd7e46b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions application/helpers/expressions/em_core_helper.php
Expand Up @@ -554,6 +554,10 @@ private function RDP_EvaluateUnary(array $token)
$this->RDP_AddError(self::gT("Invalid value(s) on the stack"), $token);
return false;
}
// If argmument is empty, then assume it is 0
if ($arg1[0] == '') {
$arg1[0] = 0;
};
// TODO: try to determine datatype?
switch ($token[0]) {
case '+':
Expand Down

0 comments on commit cd7e46b

Please sign in to comment.