Skip to content

Commit 9282167

Browse files
committed
fix methode append not empty data
1 parent 8401952 commit 9282167

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Arrays.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ public static function appendNotEmptyData(array $first, array $second): array
199199
$result = self::removeEmpty($second);
200200
break;
201201
default:
202-
$result = self::mergeNotEmptyData($first, $second);
202+
foreach ($second as $key => $value) {
203+
if (!empty($value) && !array_key_exists($key, $first)) $first[$key] = $value;
204+
}
205+
$result = $first;
203206
break;
204207
}
205208

0 commit comments

Comments
 (0)