Commit a87bb869 authored by Franz Liedke's avatar Franz Liedke

Fix a bug with Eloquent model classes and isset() when eager loading a...

Fix a bug with Eloquent model classes and isset() when eager loading a relationship returns an empty result set.
parent 603e349d
...@@ -725,7 +725,7 @@ abstract class Model { ...@@ -725,7 +725,7 @@ abstract class Model {
{ {
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment