diff --git a/application/helpers/expressions/em_core_helper.php b/application/helpers/expressions/em_core_helper.php index 1fe6e7549f4..87359356645 100644 --- a/application/helpers/expressions/em_core_helper.php +++ b/application/helpers/expressions/em_core_helper.php @@ -1787,9 +1787,12 @@ private function HasSyntaxErrors() break; } } - if ($nesting != 0) { + if ($nesting > 0) { $this->RDP_AddError(sprintf(self::gT("Missing %s closing right parentheses"), $nesting), null); } + if ($nesting < 0) { + $this->RDP_AddError(sprintf(self::gT("Missing %s closing left parentheses"), abs($nesting)), null); + } return (count($this->RDP_errs) > 0); }