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.
Details
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Commits
- rARC28f5b0ddc6bb: Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule`
Summary
Test Plan
I don't have PHP 5.3 easily accessible to test this.
Diff Detail
Diff Detail
- Repository
- rARC Arcanist
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
joshuaspence updated this object.
Herald added a reviewer: Blessed Reviewers. · View Herald TranscriptNov 24 2015, 5:11 AM2015-11-24 05:11:17 (UTC+0)
This revision now requires changes to proceed.Nov 24 2015, 1:49 PM2015-11-24 13:49:01 (UTC+0)
joshuaspence retitled this revision from Use `array_fuse` instead of `array_combine` to Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule`.Nov 24 2015, 7:57 PM2015-11-24 19:57:42 (UTC+0)
joshuaspence updated this object.
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.
Comment ActionsUse a conditional
Herald added a subscriber: Korvin. · View Herald TranscriptNov 24 2015, 7:58 PM2015-11-24 19:58:00 (UTC+0)
joshuaspence retitled this revision from Use `array_fuse` instead of `array_combine` to Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule`.Nov 24 2015, 7:58 PM2015-11-24 19:58:05 (UTC+0)
joshuaspence updated this object.
joshuaspence edited edge metadata.
epriestley edited edge metadata.
This revision is now accepted and ready to land.Nov 25 2015, 2:57 PM2015-11-25 14:57:38 (UTC+0)
Closed by commit rARC28f5b0ddc6bb: Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule` (authored by joshuaspence, committed by joshuaspence). · Explain WhyNov 25 2015, 7:18 PM2015-11-25 19:18:32 (UTC+0)
This revision was automatically updated to reflect the committed changes.