File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -388,7 +388,8 @@ public function offsetSet($offset, $value)
388
388
} else {
389
389
$ index = array_search (strtolower ($ offset ), array_keys (array_change_key_case ($ this ->container , CASE_LOWER )));
390
390
if (!($ index === false )) {
391
- unset($ this ->container [array_keys ($ this ->container )[$ index ]]);
391
+ $ keys = array_keys ($ this ->container );
392
+ unset($ this ->container [$ keys [$ index ]]);
392
393
}
393
394
$ this ->container [$ offset ] = $ value ;
394
395
}
@@ -407,7 +408,12 @@ public function offsetUnset($offset)
407
408
public function offsetGet ($ offset )
408
409
{
409
410
$ index = array_search (strtolower ($ offset ), array_keys (array_change_key_case ($ this ->container , CASE_LOWER )));
410
- return $ index === false ? null : array_values ($ this ->container )[$ index ];
411
+ if ($ index === false ) {
412
+ return null ;
413
+ }
414
+
415
+ $ values = array_values ($ this ->container );
416
+ return $ values [$ index ];
411
417
}
412
418
413
419
public function count ()
You can’t perform that action at this time.
0 commit comments