Skip to content

Commit 23eff1f

Browse files
committed
fix : Fix logic error in slice() method
1 parent 0f4c020 commit 23eff1f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/kim/present/lib/arrayutils/ArrayUtils.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -864,9 +864,9 @@ protected static function __slice(array $from, int $start = 0, int $end = null,
864864
$max = $end < 0 ? max($count + $end, 0) : min($end, $count);
865865
for(; $i < $max; ++$i){
866866
if($preserveKeys){
867-
$from[$keys[$i]] = $values[$i];
867+
$array[$keys[$i]] = $values[$i];
868868
}else{
869-
$from[] = $values[$i];
869+
$array[] = $values[$i];
870870
}
871871
}
872872

0 commit comments

Comments
 (0)