Skip to content

Commit

Permalink
Added null check
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed May 7, 2019
1 parent 59af899 commit 323eae3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
}
Expand Down

0 comments on commit 323eae3

Please sign in to comment.