Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 1, 2020
1 parent fccdf7c commit d82f78b
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 @@ -557,7 +557,13 @@ public function getQueueableIds()
*/
public function getQueueableRelations()
{
return $this->isEmpty() ? [] : array_intersect(...$this->map->getQueueableRelations()->all());
if ($this->isEmpty()) {
return [];
}

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

return count($relations) <= 1 ? $relations : array_intersect(...$relations);
}

/**
Expand Down

0 comments on commit d82f78b

Please sign in to comment.