Skip to content

Commit

Permalink
Merge pull request #3445 from Alex-Code/getValue
Browse files Browse the repository at this point in the history
Check if property is set
  • Loading branch information
samdark committed May 31, 2014
2 parents 2a6e064 + 2748288 commit a5846fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion framework/helpers/BaseArrayHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ public static function getValue($array, $key, $default = null)
$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;
Expand Down

0 comments on commit a5846fa

Please sign in to comment.