mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Prevent crash when iterator class does not exist
This commit is contained in:
parent
419d1da98d
commit
b83f540b15
@ -585,6 +585,7 @@ class ForeachAnalyzer
|
||||
$value_type_part = $array_atomic_type->type_params[1];
|
||||
} else {
|
||||
if ($array_atomic_type instanceof Type\Atomic\TNamedObject
|
||||
&& $codebase->classExists($array_atomic_type->value)
|
||||
&& $codebase->classImplements(
|
||||
$array_atomic_type->value,
|
||||
'Traversable'
|
||||
|
Loading…
x
Reference in New Issue
Block a user