Commit 3c97119
Fix undefined variable false positive for by-reference array items
Restore bug-6799c.php test to use undefined variable in [&$x] (the
previous $x = null assignment defeated the test purpose). Allow
undefined expressions in by-reference array items using the same
set/unset pattern used for function call by-reference arguments.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 1a312aa commit 3c97119
File tree
2 files changed
+6
-3
lines changed- src/Analyser/ExprHandler
- tests/PHPStan/Analyser/nsrt
2 files changed
+6
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| 78 | + | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | | - | |
| 10 | + | |
13 | 11 | | |
14 | 12 | | |
15 | 13 | | |
| |||
0 commit comments