diff --git a/src/Statement.php b/src/Statement.php index 439eb1370..c7fb944ee 100644 --- a/src/Statement.php +++ b/src/Statement.php @@ -401,9 +401,11 @@ public function parse(Parser $parser, TokensList $list) $this->after($parser, $list, $token); // #223 Here may make a patch, if last is delimiter, back one - if ((new $class()) instanceof FunctionCall) { - if ($list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER) { - --$list->idx; + if ($class !== null) { + if ((new $class()) instanceof FunctionCall) { + if ($list->offsetGet($list->idx)->type === Token::TYPE_DELIMITER) { + --$list->idx; + } } } }