Page MenuHomePhabricator

Parse JSON as an associate array.
ClosedPublic

Authored by joshuaspence on May 6 2014, 4:17 AM.
Tags
None
Referenced Files
F14036685: D8993.diff
Sun, Nov 10, 11:36 AM
F14028515: D8993.id21354.diff
Fri, Nov 8, 1:54 PM
F13989067: D8993.diff
Mon, Oct 21, 5:53 PM
F13971862: D8993.diff
Thu, Oct 17, 3:44 PM
F13971854: D8993.id.diff
Thu, Oct 17, 3:41 PM
F13971853: D8993.id21353.diff
Thu, Oct 17, 3:40 PM
F13971840: D8993.id21354.diff
Thu, Oct 17, 3:38 PM
Unknown Object (File)
Oct 1 2024, 7:09 PM
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
Branch
jshint
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 267
Build 267: [Placeholder Plan] Wait for 30 Seconds

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).