We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdf2e7b commit e81f806Copy full SHA for e81f806
1 file changed
system/Entity.php
@@ -294,8 +294,14 @@ public function __get(string $key)
294
{
295
$result = $this->castAs($result, $this->_options['casts'][$key]);
296
}
297
+
298
+ if(isset($result) && $result !== null)
299
+ {
300
+ return $result;
301
+ }
302
303
+ throw EntityException::forTryingToAccessNonExistentProperty($key, __CLASS__);
304
- return $result;
305
306
307
//--------------------------------------------------------------------
0 commit comments