Skip to content

Commit 471da18

Browse files
committed
Fix 5.3-5.6 builds
1 parent 3610afb commit 471da18

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Seld/JsonLint/JsonParser.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ public function parse($input, $flags = 0)
235235
// use default actions if available
236236
if (isset($this->defaultActions[$state])) {
237237
$action = $this->defaultActions[$state];
238-
assert(isset($symbol));
239238
} else {
240239
if ($symbol === null) {
241240
$symbol = $this->lexer->lex();
@@ -247,6 +246,7 @@ public function parse($input, $flags = 0)
247246

248247
// handle parse error
249248
if (!$action || !$action[0]) {
249+
assert(isset($symbol));
250250
if (!$recovering) {
251251
// Report error
252252
$expected = array();
@@ -335,6 +335,7 @@ public function parse($input, $flags = 0)
335335

336336
switch ($action[0]) {
337337
case 1: // shift
338+
assert(isset($symbol));
338339
$this->stack[] = $symbol;
339340
$this->vstack[] = $this->lexer->yytext;
340341
$this->lstack[] = $this->lexer->yylloc;

0 commit comments

Comments
 (0)