Commit 27482883 by Alex-Code

Check if property is set

```getValue``` didn't check if the property on an object exists so wouldn't return the default value.
parent 7511de6c
......@@ -181,7 +181,7 @@ class BaseArrayHelper
$key = substr($key, $pos + 1);
}
if (is_object($array)) {
if (is_object($array) && isset($array->$key)) {
return $array->$key;
} elseif (is_array($array)) {
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