1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-29 20:28:59 +01:00

Fix nullref

This commit is contained in:
Matt Brown 2020-12-01 00:48:09 -05:00 committed by Daniil Gentili
parent 024bbef5cd
commit 17c9f5c746
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -3746,7 +3746,7 @@ class AssertionFinder
}
}
if ($literal_assertions) {
if ($literal_assertions && $first_var_name) {
$if_types[$first_var_name] = [$literal_assertions];
} else {
$array_root = isset($expr->args[1]->value)