Skip to content

Commit fafbdf8

Browse files
committed
Update NodeScopeResolver.php
1 parent 8036bc9 commit fafbdf8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6142,7 +6142,7 @@ private function isImplicitArrayCreation(array $dimFetchStack, Scope $scope): Tr
61426142
/**
61436143
* @param list<ArrayDimFetch> $dimFetchStack
61446144
* @param list<Type|null> $offsetTypes
6145-
* @param-out array<Expr, Type> $additionalExpressions
6145+
* @param-out list<array{Expr, Type}> $additionalExpressions
61466146
*/
61476147
private function produceArrayDimFetchAssignValueToWrite(array $dimFetchStack, array $offsetTypes, Type $offsetValueType, Type $valueToWrite, Scope $scope, array &$additionalExpressions = []): Type
61486148
{
@@ -6236,7 +6236,7 @@ private function produceArrayDimFetchAssignValueToWrite(array $dimFetchStack, ar
62366236

62376237
$iterableValueType = $valueToWrite->getIterableValueType();
62386238
foreach($dimFetchStack as $dimFetch) {
6239-
if ($dimFetch->dim === null) {
6239+
if ($dimFetch->dim === null || $dimFetch->dim instanceof Node\Scalar) {
62406240
$additionalExpressions = [];
62416241
break;
62426242
}

0 commit comments

Comments
 (0)