Merge pull request #879 from franzliedke/patch-17
[Eloquent] Bug with eager loading relationships and isset()
This commit is contained in:
commit
5c44cf98cd
|
@ -725,7 +725,7 @@ public function __isset($key)
|
||||||
{
|
{
|
||||||
foreach (array('attributes', 'relationships') as $source)
|
foreach (array('attributes', 'relationships') as $source)
|
||||||
{
|
{
|
||||||
if (array_key_exists($key, $this->$source)) return true;
|
if (array_key_exists($key, $this->$source)) return !is_null($this->$source[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (method_exists($this, $key)) return true;
|
if (method_exists($this, $key)) return true;
|
||||||
|
|
Loading…
Reference in New Issue