Commit c019c75
committed
PHP 8.5 | File::getMemberProperties(): fix "Using null as an array offset" deprecation
If a variable in the global scope is passed to `File::getMemberProperties()`, the token may not have any "conditions".
This would result in `array_keys()` returning an empty array, which will cause `array_pop()` to return `null`, leading to the deprecation notice.
Fixed now via some extra defensive coding.
This change is already covered via the existing tests.
Ref: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_using_values_null_as_an_array_offset_and_when_calling_array_key_exists1 parent f1c9394 commit c019c75
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1876 | 1876 | | |
1877 | 1877 | | |
1878 | 1878 | | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
1879 | 1883 | | |
1880 | 1884 | | |
1881 | 1885 | | |
| |||
0 commit comments