1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Add slashes

This commit is contained in:
Matt Brown 2021-02-09 10:57:19 -05:00
parent a955dabfe5
commit b9dac8c46c

View File

@ -86,7 +86,7 @@ class ElseAnalyzer
foreach ($changed_var_ids as $changed_var_id => $_) {
foreach ($else_context->vars_in_scope as $var_id => $_) {
if (preg_match('/' . preg_quote($changed_var_id, '/') . '[\]\[\-]/', $var_id)
if (\preg_match('/' . \preg_quote($changed_var_id, '/') . '[\]\[\-]/', $var_id)
&& !\array_key_exists($var_id, $changed_var_ids)
) {
unset($else_context->vars_in_scope[$var_id]);