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

Don’t stop analysing when encountering an UndefinedGlobalVariable

Fixes #3366
This commit is contained in:
Brown 2020-05-14 22:51:51 -04:00
parent ae48c1895f
commit c212c03e40

View File

@ -177,7 +177,7 @@ class VariableFetchAnalyzer
),
$statements_analyzer->getSuppressedIssues()
)) {
return false;
// fall through
}
$statements_analyzer->node_data->setType($stmt, Type::getMixed());
@ -197,7 +197,7 @@ class VariableFetchAnalyzer
$statements_analyzer->node_data->setType($stmt, Type::getMixed());
return false;
return null;
}
}
@ -228,7 +228,7 @@ class VariableFetchAnalyzer
$statements_analyzer->getSuppressedIssues(),
(bool) $statements_analyzer->getBranchPoint($var_name)
)) {
return false;
return;
}
} else {
if ($codebase->alter_code) {