Revert "#9915: changed behavior of ArrayHelper::getValue() according to @azureru suggestion"

This reverts commit 4b511fb9bcbb1fc5838ad8bc65f3852b09287acb.
This commit is contained in:
SilverFire - Dmitry Naumenko
2016-01-15 16:03:46 +02:00
parent 4b511fb9bc
commit f72e9d5bcf

View File

@ -198,7 +198,7 @@ class BaseArrayHelper
$key = substr($key, $pos + 1); $key = substr($key, $pos + 1);
} }
if (is_object($array) && property_exists($array, $key)) { if (is_object($array) && isset($array->$key)) {
return $array->$key; return $array->$key;
} elseif (is_array($array)) { } elseif (is_array($array)) {
return array_key_exists($key, $array) ? $array[$key] : $default; return array_key_exists($key, $array) ? $array[$key] : $default;