File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 174174use PHPStan \Type \Constant \ConstantIntegerType ;
175175use PHPStan \Type \Constant \ConstantStringType ;
176176use PHPStan \Type \ConstantTypeHelper ;
177+ use PHPStan \Type \ErrorType ;
177178use PHPStan \Type \FileTypeMapper ;
178179use PHPStan \Type \GeneralizePrecision ;
179180use PHPStan \Type \Generic \TemplateTypeHelper ;
199200use PHPStan \Type \TypeTraverser ;
200201use PHPStan \Type \TypeUtils ;
201202use PHPStan \Type \UnionType ;
203+ use PHPStan \Type \VerbosityLevel ;
202204use ReflectionFunction ;
203205use ReflectionMethod ;
204206use ReflectionProperty ;
@@ -6415,7 +6417,11 @@ private function processAssignVar(
64156417 }
64166418
64176419 $ setVarType = $ scope ->getType ($ originalVar ->var );
6418- if (!$ setVarType ->isArray ()->yes () && !(new ObjectType (ArrayAccess::class))->isSuperTypeOf ($ setVarType )->no ()) {
6420+ if (
6421+ !$ setVarType instanceof ErrorType
6422+ && !$ setVarType ->isArray ()->yes ()
6423+ && !(new ObjectType (ArrayAccess::class))->isSuperTypeOf ($ setVarType )->no ()
6424+ ) {
64196425 $ throwPoints = array_merge ($ throwPoints , $ this ->processExprNode (
64206426 $ stmt ,
64216427 new MethodCall ($ originalVar ->var , 'offsetSet ' ),
You can’t perform that action at this time.
0 commit comments