Skip to content

Commit d82f78b

Browse files
committed
fix
1 parent fccdf7c commit d82f78b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Illuminate/Database/Eloquent/Collection.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,13 @@ public function getQueueableIds()
557557
*/
558558
public function getQueueableRelations()
559559
{
560-
return $this->isEmpty() ? [] : array_intersect(...$this->map->getQueueableRelations()->all());
560+
if ($this->isEmpty()) {
561+
return [];
562+
}
563+
564+
$relations = $this->map->getQueueableRelations()->all();
565+
566+
return count($relations) <= 1 ? $relations : array_intersect(...$relations);
561567
}
562568

563569
/**

0 commit comments

Comments
 (0)