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

This commit is contained in:
Alexander Makarov
2016-01-15 15:21:08 +03:00
parent eda1e7b027
commit 4b511fb9bc

View File

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