From f494f77952a4e8884cf41be4d468de6e16aeb4c6 Mon Sep 17 00:00:00 2001 From: MGatner Date: Thu, 10 Jun 2021 18:36:06 +0000 Subject: [PATCH] Revert model coalesce --- system/Model.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; } /**