diff --git a/system/Model.php b/system/Model.php index 525ac91e17b0..1994373351b2 100644 --- a/system/Model.php +++ b/system/Model.php @@ -707,7 +707,17 @@ protected function objectToRawArray($data, bool $onlyChanged = true, bool $recur */ public function __get(string $name) { - return parent::__get($name) ?? $this->builder()->$name ?? null; + if (parent::__isset($name)) + { + return parent::__get($name); + } + + if (isset($this->builder()->$name)) + { + return $this->builder()->$name; + } + + return null; } /**