From 493fcce6e074ef3618f7744f5230019de9b8dde8 Mon Sep 17 00:00:00 2001 From: Ivan Shalganov Date: Mon, 6 Jul 2020 11:31:08 +0300 Subject: [PATCH] `notice` appears when expression unexpectedly ends --- src/Fenom/Tokenizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fenom/Tokenizer.php b/src/Fenom/Tokenizer.php index 6105a3f..12e773a 100644 --- a/src/Fenom/Tokenizer.php +++ b/src/Fenom/Tokenizer.php @@ -523,7 +523,7 @@ class Tokenizer */ public function skipIf($token1 /*, $token2, ...*/) { - if ($this->_valid(func_get_args(), $this->curr[0])) { + if ($this->curr && $this->_valid(func_get_args(), $this->curr[0])) { $this->next(); } return $this;