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)
Sat, Dec 21, 3:36 PM
Unknown Object (File)
Tue, Dec 17, 6:21 AM
Unknown Object (File)
Sun, Dec 1, 5:14 PM
Unknown Object (File)
Mon, Nov 25, 4:08 PM
Unknown Object (File)
Nov 18 2024, 4:48 AM
Unknown Object (File)
Nov 17 2024, 12:21 AM
Unknown Object (File)
Nov 13 2024, 8:37 PM
Unknown Object (File)
Nov 10 2024, 11:36 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).