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 50c7e02 commit b5596ca
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 @@ -798,7 +798,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 b5596ca

Please sign in to comment.