Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic.Functions.CallTimePassByReference.NotAllowed false positive when short array syntax #897

Closed
legoktm opened this issue Feb 17, 2016 · 1 comment

Comments

@legoktm
Copy link
Contributor

legoktm commented Feb 17, 2016

The following code will (wrongly) trigger the sniff:

Hooks::run( 'SecondaryDataUpdates', [ $title, $old, $recursive, $parserOutput, &$updates ] );

This code is fine though:

Hooks::run( 'SecondaryDataUpdates', array( $title, $old, $recursive, $parserOutput, &$updates ) );

We observed this while mass-migrating MediaWiki to []-style arrays usinb phpcbf :)

Downstream bug: https://phabricator.wikimedia.org/T127163

@gsherwood gsherwood changed the title Generic.Functions.CallTimePassByReference.NotAllowed false positive when using []-style arrays Generic.Functions.CallTimePassByReference.NotAllowed false positive when short array syntax Feb 19, 2016
gsherwood added a commit that referenced this issue Feb 19, 2016
@gsherwood
Copy link
Member

Thanks for reporting this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants