Fix #19914: Fixed ArrayHelper::keyExists() and ::remove() functions when the key is a float and the value is null

This commit is contained in:
rhertogh
2023-08-18 13:31:09 +02:00
committed by GitHub
parent 786a75ca63
commit e916e9d564
4 changed files with 72 additions and 11 deletions

View File

@ -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);