Skip to content

Commit

Permalink
Revert model coalesce
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Jun 10, 2021
1 parent 4f42d4b commit f494f77
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion system/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit f494f77

Please sign in to comment.