summaryrefslogtreecommitdiff
path: root/vendor/illuminate/support/Arr.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/illuminate/support/Arr.php')
-rwxr-xr-xvendor/illuminate/support/Arr.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/vendor/illuminate/support/Arr.php b/vendor/illuminate/support/Arr.php
index 0f0b6fcf8e..31824b60c9 100755
--- a/vendor/illuminate/support/Arr.php
+++ b/vendor/illuminate/support/Arr.php
@@ -213,10 +213,14 @@ class Arr
if (! is_array($item)) {
$result[] = $item;
- } elseif ($depth === 1) {
- $result = array_merge($result, array_values($item));
} else {
- $result = array_merge($result, static::flatten($item, $depth - 1));
+ $values = $depth === 1
+ ? array_values($item)
+ : static::flatten($item, $depth - 1);
+
+ foreach ($values as $value) {
+ $result[] = $value;
+ }
}
}