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

Add protective isset

This commit is contained in:
Matthew Brown 2016-04-12 11:30:11 -04:00
parent ff578f8468
commit e4846cd62f

View File

@ -414,7 +414,7 @@ class StatementsChecker
$vars_in_scope[$var] = $redefined_vars[$var];
}
}
elseif ($type === '!array' && $redefined_vars[$var] === 'array') {
elseif ($type === '!array' && isset($redefined_vars[$var]) && $redefined_vars[$var] === 'array') {
$vars_in_scope[$var] = $redefined_vars[$var];
}
}