Skip to content

Commit

Permalink
use array values first
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed May 29, 2020
1 parent cfed253 commit 00e9ed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ public function getQueueableRelations()
if (count($relations) === 0 || $relations === [[]]) {
return [];
} elseif (count($relations) === 1) {
return $relations[0];
return array_values($relations)[0];
} else {
return array_intersect(...$relations);
}
Expand Down

0 comments on commit 00e9ed7

Please sign in to comment.