Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 5, 2020
1 parent bd63bc0 commit 7b32469
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Illuminate/Database/Eloquent/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,13 @@ public function getQueueableRelations()

$relations = $this->map->getQueueableRelations()->all();

return $relations === [[]] ? [] : array_intersect(...$relations);
if (count($relations) === 0 || $relations === [[]]) {
return [];
} elseif (count($relations) === 1) {
return $relations[0];
} else {
return array_intersect(...$relations);
}
}

/**
Expand Down

0 comments on commit 7b32469

Please sign in to comment.