From 471da18aa8f61ef33ba045a2cf341ba3a47be242 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Fri, 1 Apr 2022 15:17:57 +0200 Subject: [PATCH] Fix 5.3-5.6 builds --- src/Seld/JsonLint/JsonParser.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Seld/JsonLint/JsonParser.php b/src/Seld/JsonLint/JsonParser.php index b0e4986..beee143 100644 --- a/src/Seld/JsonLint/JsonParser.php +++ b/src/Seld/JsonLint/JsonParser.php @@ -235,7 +235,6 @@ public function parse($input, $flags = 0) // use default actions if available if (isset($this->defaultActions[$state])) { $action = $this->defaultActions[$state]; - assert(isset($symbol)); } else { if ($symbol === null) { $symbol = $this->lexer->lex(); @@ -247,6 +246,7 @@ public function parse($input, $flags = 0) // handle parse error if (!$action || !$action[0]) { + assert(isset($symbol)); if (!$recovering) { // Report error $expected = array(); @@ -335,6 +335,7 @@ public function parse($input, $flags = 0) switch ($action[0]) { case 1: // shift + assert(isset($symbol)); $this->stack[] = $symbol; $this->vstack[] = $this->lexer->yytext; $this->lstack[] = $this->lexer->yylloc;