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:
parent
f21d3a8346
commit
10e4e9ac65
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user