mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fix #18505: Fixed ArrayHelper::get() for ArrayAccess objects with explicitly defined properties
Co-authored-by: Bizley <pawel@positive.codes>
This commit is contained in:
committed by
GitHub
parent
95c2d214d9
commit
71791d790d
@ -196,6 +196,10 @@ class BaseArrayHelper
|
||||
$key = $lastKey;
|
||||
}
|
||||
|
||||
if (is_object($array) && property_exists($array, $key)) {
|
||||
return $array->$key;
|
||||
}
|
||||
|
||||
if (static::keyExists($key, $array)) {
|
||||
return $array[$key];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user