Skip to content

Commit

Permalink
fix methode append not empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-eliseev committed Apr 1, 2019
1 parent 8401952 commit 9282167
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Arrays.php
Expand Up @@ -199,7 +199,10 @@ public static function appendNotEmptyData(array $first, array $second): array
$result = self::removeEmpty($second);
break;
default:
$result = self::mergeNotEmptyData($first, $second);
foreach ($second as $key => $value) {
if (!empty($value) && !array_key_exists($key, $first)) $first[$key] = $value;
}
$result = $first;
break;
}

Expand Down

0 comments on commit 9282167

Please sign in to comment.