Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Aden Fraser committed Apr 28, 2016
1 parent 12c8946 commit 9370b72
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) || ! class_exists($class)) {
if (is_null($class = $this->$type) || $class === '') {
return new MorphTo(
$this->newQuery(), $this, $id, null, $type, $name
);
Expand Down

0 comments on commit 9370b72

Please sign in to comment.