From 00e9ed76483ea6ad1264676e7b1095b23e16a433 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 28 May 2020 21:50:28 -0500 Subject: [PATCH] use array values first --- src/Illuminate/Database/Eloquent/Collection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Collection.php b/src/Illuminate/Database/Eloquent/Collection.php index 9701faaa738d..c4e8d9f1778c 100755 --- a/src/Illuminate/Database/Eloquent/Collection.php +++ b/src/Illuminate/Database/Eloquent/Collection.php @@ -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); }