phptools-docs
phptools-docs copied to clipboard
Incorrect triggering of PHP0421 warning: The variable '$...' is assigned, but its value is never used
Hi.
Why when I use assignment to array by just created variable Devsense reports me PHP0421 warning? Variable will be used in next code line.
Thank you for reporting that, it looks like a bug.
Code to reproduce:
$form[0] = $container = new ArrayObject;
$container[1] = 123;
$form[0] = $container = new ArrayObject; $container[1] = 123;
Fixed in the next update (1.47 pre-release or 1.48), thanks!