Fixing Set::merge, broken in previous optimizations

This commit is contained in:
José Lorenzo Rodríguez 2010-12-21 22:24:55 -04:30
parent 6bd735955d
commit 75bfbe0e37

View file

@ -46,7 +46,7 @@ class Set {
$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;