hjson/hjson-php

{ :0 } causes Fatal Error

Closed this issue · 4 comments

{
  :0
}

causes Fatal error: Cannot access empty property in .../src/HJSON/HJSONParser.php on line 204 instead of a exception with message Error: Found ':' but no key name

@luizbills, it looks like it's the empty key name and the hjson-php throw the exception to warn you.

@dqsully, I think it's not the issue and this issue can be closed 😄.

As of now, hjson-php will skip over this invalid property because of commit 35f8b3c. Should we throw an error instead?

@dqsully, thank you for your reply. I think it's okay to throw the exception :).

I reopen this issue.

Was fixed by #15, throws an exception as it should.