Skip to content

Commit

Permalink
Fixing Set::merge, broken in previous optimizations
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Dec 22, 2010
1 parent 6bd7359 commit 75bfbe0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Set.php
Expand Up @@ -46,7 +46,7 @@ public static function merge($arr1, $arr2 = null) {
$r = (array)current($args);
while (($arg = next($args)) !== false) {
foreach ((array)$arg as $key => $val) {
if (!empty($r[$key]) && is_array($r[$key])) {
if (!empty($r[$key]) && is_array($r[$key]) && is_array($val)) {
$r[$key] = Set::merge($r[$key], $val);
} elseif (is_int($key)) {
$r[] = $val;
Expand Down

0 comments on commit 75bfbe0

Please sign in to comment.