pdt
pdt copied to clipboard
Referenced variable is falsely marked as never used
Describe the bug
A referenced variable in a foreach loop is falsely marked as never used:
It is a false positive, because $array after the loop has the values [2, 4].
Describe the eclipse environment
Eclipse 23.03 PDT 8.0.0.202305201924
Describe your system
- OS: Ubuntu
- Version 23.04
To Reproduce
See screenshot above
Expected behavior There should not be a warning
another example of the same issue:
This is an issue in the PHP 7 tooling also.
Eclipse IDE for PHP Developers (includes Incubating components)
Version: 2023-03 (4.27.0) Build id: 20230309-1520
PHP Development Tools (PDT) 7.2.1.202112011741
Similar issue #87