File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-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 ;
@@ -6415,7 +6416,11 @@ private function processAssignVar(
64156416 }
64166417
64176418 $ setVarType = $ scope ->getType ($ originalVar ->var );
6418- if (!$ setVarType ->isArray ()->yes () && !(new ObjectType (ArrayAccess::class))->isSuperTypeOf ($ setVarType )->no ()) {
6419+ if (
6420+ !$ setVarType instanceof ErrorType
6421+ && !$ setVarType ->isArray ()->yes ()
6422+ && !(new ObjectType (ArrayAccess::class))->isSuperTypeOf ($ setVarType )->no ()
6423+ ) {
64196424 $ throwPoints = array_merge ($ throwPoints , $ this ->processExprNode (
64206425 $ stmt ,
64216426 new MethodCall ($ originalVar ->var , 'offsetSet ' ),
You can’t perform that action at this time.
0 commit comments