From cd7e46b62060bc03f61d42ddee12f6c4f08e1c67 Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Tue, 17 Aug 2021 09:39:20 +0200 Subject: [PATCH] Fixed issue: Fatal error when using unary operator on empty string --- application/helpers/expressions/em_core_helper.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/application/helpers/expressions/em_core_helper.php b/application/helpers/expressions/em_core_helper.php index 87359356645..7dee2191da2 100644 --- a/application/helpers/expressions/em_core_helper.php +++ b/application/helpers/expressions/em_core_helper.php @@ -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 '+':