summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Statement.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Statement.php b/src/Statement.php
index e7238f2..de94951 100644
--- a/src/Statement.php
+++ b/src/Statement.php
@@ -403,9 +403,11 @@ abstract class Statement
$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;
+ }
}
}
}