You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$parts is not marked as undefined. This is happening because array_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:
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 $matches in preg_match(). Therefore, we can fix this by removing all the pass-by-reference arguments and functions from getPassByReferenceFunction() that do not allow this.
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: