We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 93b4104 commit 9ad75eeCopy full SHA for 9ad75ee
src/PHPFUI/ORM/Record.php
@@ -135,7 +135,7 @@ public function __get(string $field) : mixed
135
136
if (\class_exists($type))
137
{
138
- return new $type($this->current[$field . \PHPFUI\ORM::$idSuffix]);
+ return new $type($this->current[$field . \PHPFUI\ORM::$idSuffix] ?? null);
139
}
140
141
@@ -498,10 +498,6 @@ public function setEmpty() : static
498
499
if (null === $description->defaultValue) // no default value
500
501
- if ($description->nullable) // can be null, so don't set
502
- {
503
- continue;
504
- }
505
$this->current[$field] = null; // can't be null, so we can set to null, user must set
506
507
else // has default value, if SQL default, set to null, otherwise default value
0 commit comments