Skip to content

Commit 7b32469

Browse files
committed
fix
1 parent bd63bc0 commit 7b32469

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
@@ -563,7 +563,13 @@ public function getQueueableRelations()
563563

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

566-
return $relations === [[]] ? [] : array_intersect(...$relations);
566+
if (count($relations) === 0 || $relations === [[]]) {
567+
return [];
568+
} elseif (count($relations) === 1) {
569+
return $relations[0];
570+
} else {
571+
return array_intersect(...$relations);
572+
}
567573
}
568574

569575
/**

0 commit comments

Comments
 (0)