Skip to content

Commit

Permalink
Merge pull request #1 from laravel/5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zither committed Apr 30, 2016
2 parents 50c7e02 + 46fd7dd commit 8b9665a
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 8b9665a

Please sign in to comment.