-
Notifications
You must be signed in to change notification settings - Fork 13
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
Assignment by reference is not declaration for arrays and objects #184
Comments
I think this is actually more easily fixable than I thought. Right now (unless I'm missing something) the only reason we track pass-by-reference functions is in order to determine if a function call's use of an undefined variable can count as defining that variable. A common example is This may take a while, but I've started the process in #186 by removing the array functions. |
$parts
is not marked as undefined. This is happening becausearray_shift
counts as an assignment... but clearly not all assignments should be counted as definitions if the expected variable is an array or object.This may mean that we need to annotate all the pass-by-reference functions in both PHP and WordPress by what types of variables they expect. 😩
The text was updated successfully, but these errors were encountered: