-
Notifications
You must be signed in to change notification settings - Fork 81
Closed
Description
Feeding the input <?\&static\
into the parser results in:
Error: Attempt to assign property 'parent' of non-object in /home/nikic/tolerant-php-parser/src/Parser.php:2026
Stack trace:
#0 /home/nikic/tolerant-php-parser/src/Parser.php(1877): Microsoft\PhpParser\Parser->makeBinaryExpression(Object(Microsoft\PhpParser\Node\QualifiedName), Object(Microsoft\PhpParser\Token), NULL, NULL, Object(Microsoft\PhpParser\Node\Statement\ExpressionStatement))
#1 /home/nikic/tolerant-php-parser/src/Parser.php(1648): Microsoft\PhpParser\Parser->parseBinaryExpressionOrHigher(0, Object(Microsoft\PhpParser\Node\Statement\ExpressionStatement))
#2 /home/nikic/tolerant-php-parser/src/Parser.php(581): Microsoft\PhpParser\Parser->parseExpression(Object(Microsoft\PhpParser\Node\Statement\ExpressionStatement), true)
#3 /home/nikic/tolerant-php-parser/src/Parser.php(199): Microsoft\PhpParser\Parser->Microsoft\PhpParser\{closure}(Object(Microsoft\PhpParser\Node\SourceFileNode))
#4 /home/nikic/tolerant-php-parser/src/Parser.php(165): Microsoft\PhpParser\Parser->parseList(Object(Microsoft\PhpParser\Node\SourceFileNode), 0)
#5 /home/nikic/PHP-Fuzzer/example/target_tolerant_php_parser.php(15): Microsoft\PhpParser\Parser->parseSourceFile('<?\\&static\\\n')
Ran into this while testing a fuzzer.
djmattyg007 and jblotus
Metadata
Metadata
Assignees
Labels
No labels