Expand abnormally used ternary operator to if

This commit is contained in:
Michael Härtl
2014-10-01 12:25:08 +02:00
parent 8e16e17602
commit bf97adbf64

View File

@ -120,7 +120,11 @@ class BaseArrayHelper
$next = array_shift($args);
foreach ($next as $k => $v) {
if (is_integer($k)) {
isset($res[$k]) ? $res[] = $v : $res[$k] = $v;
if (isset($res[$k])) {
$res[] = $v;
} else {
$res[$k] = $v;
}
} elseif (is_array($v) && isset($res[$k]) && is_array($res[$k])) {
$res[$k] = self::merge($res[$k], $v);
} else {