Skip to content
Permalink
Browse files

Prevent crash when iterator class does not exist

  • Loading branch information...
muglug committed May 8, 2019
1 parent 419d1da commit b83f540b153ab9830db73be77c608358e428ecde
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php
@@ -585,6 +585,7 @@ public static function handleIterable(
$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'

0 comments on commit b83f540

Please sign in to comment.
You can’t perform that action at this time.