1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Fix #3617 - prevent crash when constant class doesn’t exist

This commit is contained in:
Brown 2020-06-20 23:30:36 -04:00
parent f21d3a8346
commit 10e4e9ac65

View File

@ -481,6 +481,10 @@ class Reconciler
if (strpos($base_key, '::')) {
list($fq_class_name, $const_name) = explode('::', $base_key);
if (!$codebase->classlikes->classOrInterfaceExists($fq_class_name)) {
return false;
}
$class_constant = $codebase->classlikes->getConstantForClass(
$fq_class_name,
$const_name,