diff --git a/src/Analyser/MutatingScope.php b/src/Analyser/MutatingScope.php index 395626e1ce..e4e92d074e 100644 --- a/src/Analyser/MutatingScope.php +++ b/src/Analyser/MutatingScope.php @@ -4238,7 +4238,7 @@ public function specifyExpressionType(Expr $expr, Type $type, Type $nativeType, new ObjectType(ArrayAccess::class), new NullType(), ]; - if ($dimType instanceof ConstantIntegerType) { + if ($dimType->isInteger()->yes()) { $types[] = new StringType(); }