You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you give an empty file to bin/php-parse, it crashes the parser:
====> File empty.php:
PHP Warning: Attempt to read property "id" on array in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php on line 249
Warning: Attempt to read property "id" on array in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php on line 249
PHP Warning: Attempt to read property "text" on array in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php on line 253
Warning: Attempt to read property "text" on array in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php on line 253
PHP Fatal error: Uncaught RangeException: The lexer returned an invalid token (id=0, value=) in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php:255
Stack trace:
#0 /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php(183): PhpParser\ParserAbstract->doParse()
#1 /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/bin/php-parse(68): PhpParser\ParserAbstract->parse('')
#2 /Users/ondrej/Development/BetterReflection/vendor/bin/php-parse(119): include('/Users/ondrej/D...')
#3 {main}
thrown in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php on line 255
Fatal error: Uncaught RangeException: The lexer returned an invalid token (id=0, value=) in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php:255
Stack trace:
#0 /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php(183): PhpParser\ParserAbstract->doParse()
#1 /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/bin/php-parse(68): PhpParser\ParserAbstract->parse('')
#2 /Users/ondrej/Development/BetterReflection/vendor/bin/php-parse(119): include('/Users/ondrej/D...')
#3 {main}
thrown in /Users/ondrej/Development/BetterReflection/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php on line 255
The text was updated successfully, but these errors were encountered:
When you give an empty file to
bin/php-parse
, it crashes the parser:The text was updated successfully, but these errors were encountered: