Skip to content

Commit 0110284

Browse files
committed
Update AssignHandler.php
1 parent cd2a1e2 commit 0110284

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Analyser/ExprHandler/AssignHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ private function produceArrayDimFetchAssignValueToWrite(array $dimFetchStack, ar
947947
$originalValueToWrite = $valueToWrite;
948948

949949
$offsetValueTypeStack = [$offsetValueType];
950-
$overwrites = true;
950+
$overwrites = $offsetTypes[array_key_last($offsetTypes)][0] !== null;
951951
foreach (array_slice($offsetTypes, 0, -1) as [$offsetType, $dimFetch]) {
952952
if ($offsetType === null) {
953953
$offsetValueType = new ConstantArrayType([], []);

0 commit comments

Comments
 (0)