1
0
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:
Brown 2019-05-08 11:03:47 -04:00
parent 419d1da98d
commit b83f540b15

View File

@ -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'