Commit a5846fa2 by Alexander Makarov

Merge pull request #3445 from Alex-Code/getValue

Check if property is set
parents 2a6e064a 27482883
...@@ -181,7 +181,7 @@ class BaseArrayHelper ...@@ -181,7 +181,7 @@ class BaseArrayHelper
$key = substr($key, $pos + 1); $key = substr($key, $pos + 1);
} }
if (is_object($array)) { 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment