Page MenuHomePhabricator

Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule`
ClosedPublic

Authored by joshuaspence on Nov 24 2015, 5:11 AM.
Tags
None
Referenced Files
F13294188: D14567.id35232.diff
Wed, Jun 5, 4:17 PM
F13294186: D14567.diff
Wed, Jun 5, 4:17 PM
F13293154: D14567.id35255.diff
Wed, Jun 5, 6:57 AM
F13293153: D14567.id35236.diff
Wed, Jun 5, 6:57 AM
F13293152: D14567.id.diff
Wed, Jun 5, 6:57 AM
F13264252: D14567.id.diff
Mon, May 27, 3:33 PM
F13247637: D14567.diff
Thu, May 23, 9:13 PM
F13241865: D14567.id35255.diff
Wed, May 22, 11:57 PM
Subscribers

Details

Summary

A user reported to me that arc lint was failing with an error message along the lines of "argument 1 passed to idx must be of type array, bool given". I suspect that the user is running an older version of PHP, which means that array_combine(array(), array()) is returning false instead of the expected array(). Instead, avoid calling array_combine on an empty array.

Test Plan

I don't have PHP 5.3 easily accessible to test this.

Diff Detail

Branch
master
Lint
Lint Passed
Unit
Test Failures
Build Status
Buildable 9041
Build 10629: arc lint + arc unit

Event Timeline

joshuaspence retitled this revision from to Use `array_fuse` instead of `array_combine`.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
This revision now requires changes to proceed.Nov 24 2015, 1:49 PM
joshuaspence retitled this revision from Use `array_fuse` instead of `array_combine` to Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule`.Nov 24 2015, 7:57 PM
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence edited edge metadata.
joshuaspence edited edge metadata.
joshuaspence retitled this revision from Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule` to Use `array_fuse` instead of `array_combine`.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)

Use a conditional

joshuaspence retitled this revision from Use `array_fuse` instead of `array_combine` to Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule`.Nov 24 2015, 7:58 PM
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence edited edge metadata.
joshuaspence removed rARC Arcanist as the repository for this revision.
joshuaspence removed a subscriber: Korvin.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 25 2015, 2:57 PM
This revision was automatically updated to reflect the committed changes.