Home GnuPG

Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule`
28f5b0ddc6bbUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix a compatibility issue with ArcanistUnsafeDynamicStringXHPASTLinterRule

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.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D14567

Details

Provenance
Joshua Spence <josh@freelancer.com>Authored on Nov 25 2015, 8:18 PM
Parents
rARC9e78d15fc0c7: Improve the "unexpected return value" linter rule
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@freelancer.com> committed rARC28f5b0ddc6bb: Fix a compatibility issue with `ArcanistUnsafeDynamicStringXHPASTLinterRule` (authored by Joshua Spence <josh@freelancer.com>).Nov 25 2015, 8:18 PM