Page MenuHomePhabricator

Parse JSON as an associate array.
ClosedPublic

Authored by joshuaspence on May 6 2014, 4:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jan 29, 3:50 PM
Unknown Object (File)
Mon, Jan 20, 11:10 AM
Unknown Object (File)
Sat, Jan 18, 4:45 AM
Unknown Object (File)
Sat, Jan 18, 2:06 AM
Unknown Object (File)
Fri, Jan 17, 5:54 PM
Unknown Object (File)
Dec 31 2024, 8:58 PM
Unknown Object (File)
Dec 21 2024, 3:36 PM
Unknown Object (File)
Dec 17 2024, 6:21 AM
Subscribers

Details

Summary

It seems that in some situations, JSHint does not set the evidence property. In such cases, PHP fails with Undefined property: stdClass::$evidence. It would be safer to access the error object as an associative array rather than as stdClass.

Test Plan

Ran arc lint over a file which (previously) caused the exception.

Diff Detail

Repository
rARC Arcanist
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Parse JSON as an associate array..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.May 6 2014, 4:18 AM
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence edited edge metadata.
epriestley updated this revision to Diff 21354.

Closed by commit rARC9a13c87ac4a9 (authored by @joshuaspence, committed by @epriestley).