Skip to content

Commit

Permalink
Fix Issue #11169
Browse files Browse the repository at this point in the history
  • Loading branch information
Aden Fraser committed Apr 29, 2016
1 parent 6e895a1 commit 3af995f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public function morphTo($name = null, $type = null, $id = null)
// If the type value is null it is probably safe to assume we're eager loading
// the relationship. When that is the case we will pass in a dummy query as
// there are multiple types in the morph and we can't use single queries.
if (is_null($class = $this->$type)) {
if (empty($class = $this->$type)) {
return new MorphTo(
$this->newQuery(), $this, $id, null, $type, $name
);
Expand Down

0 comments on commit 3af995f

Please sign in to comment.