mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-01 11:39:41 +08:00
Fix #19914: Fixed ArrayHelper::keyExists() and ::remove() functions when the key is a float and the value is null
This commit is contained in:
@ -282,7 +282,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
|
||||
*/
|
||||
public function __get($name)
|
||||
{
|
||||
if (isset($this->_attributes[$name]) || array_key_exists($name, $this->_attributes)) {
|
||||
if (array_key_exists($name, $this->_attributes)) {
|
||||
return $this->_attributes[$name];
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ abstract class BaseActiveRecord extends Model implements ActiveRecordInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isset($this->_related[$name]) || array_key_exists($name, $this->_related)) {
|
||||
if (array_key_exists($name, $this->_related)) {
|
||||
return $this->_related[$name];
|
||||
}
|
||||
$value = parent::__get($name);
|
||||
|
||||
Reference in New Issue
Block a user