Skip to content

Commit 95371aa

Browse files
committed
fix: array nested key issue
1 parent ff5aa36 commit 95371aa

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Helpers/Arr.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,11 @@ public static function set(&$array, $key, $value)
564564
return $array = $value;
565565
}
566566

567-
$keys = explode('.', $key);
567+
if (\is_array($key)) {
568+
$keys = $key;
569+
} else {
570+
$keys = explode('.', $key);
571+
}
568572

569573
foreach ($keys as $i => $key) {
570574
if (\count($keys) === 1) {

0 commit comments

Comments
 (0)