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
{{ message }}
Repository navigation
$GLOBALS in function leaves variable unassigned #303
I'm trying to set up a debugging function using $GLOBALS, and phptools is saying the variable I assign a value with is unassigned. The variable works fine, and I had to trick phptools into preventing it from giving me an error.
This shows the variable $xValue as unassigned.
I trick phptools with an assignment that never happens.
Activity
jakubmisek commentedon Mar 6, 2023
Thank you @bookworm109 for reporting the issue!
We'll fix that.
FYI I would suggest another quick workaround for now:
jakubmisek commentedon Mar 16, 2023
Fixed in the next pre-release, thank you!
Hint: to improve the editor type inferring, you can take advantage of PHPDoc:
/** @var string $xValue */