Seldaek / jsonlint

JSON Lint for PHP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0 is wrongly detected as invalid

bolmstedt opened this issue · comments

When linting just a 0, it is wrongly detected as invalid: Expected one of: 'EOF', '}', ',', ']'

Steps to reproduce:

  1. Add '0', to the end of the numbers in tests/JsonParserTest.php
  2. Run tests.

It seems that the culprit is the falsey comparison if (!$this->input) in the next() function in src/Seld/JsonLint/Lexer.php