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 28a880b commit b0eb9a8Copy full SHA for b0eb9a8
laravel/database/eloquent/model.php
@@ -711,10 +711,10 @@ public function __isset($key)
711
{
712
foreach (array('attributes', 'relationships') as $source)
713
714
- if (array_key_exists($key, $this->$source)) return true;
+ if (array_key_exists($key, $this->{$source})) return ! empty($this->{$source}[$key]);
715
}
716
717
- if (method_exists($this, $key)) return true;
+ return false;
718
719
720
/**
@@ -727,7 +727,7 @@ public function __unset($key)
727
728
729
730
- unset($this->$source[$key]);
+ unset($this->{$source}[$key]);
731
732
733
0 commit comments