From: Dan Brown Date: Sat, 28 Nov 2020 16:42:12 +0000 (+0000) Subject: Fixed bad collection/array mixing causing error on seed X-Git-Tag: v0.31.0~3^2~27 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/bf8716bb22e307e94abaf4bf7ef89b5caa46aeed Fixed bad collection/array mixing causing error on seed --- diff --git a/app/Entities/Tools/SearchIndex.php b/app/Entities/Tools/SearchIndex.php index 687b9d072..81a5022ce 100644 --- a/app/Entities/Tools/SearchIndex.php +++ b/app/Entities/Tools/SearchIndex.php @@ -3,6 +3,7 @@ use BookStack\Entities\EntityProvider; use BookStack\Entities\Models\Entity; use BookStack\Entities\Models\SearchTerm; +use Illuminate\Support\Collection; class SearchIndex { @@ -75,8 +76,8 @@ class SearchIndex $entityModel->newQuery() ->withTrashed() ->select($selectFields) - ->chunk(1000, function ($entities) { - $this->indexEntities($entities); + ->chunk(1000, function (Collection $entities) { + $this->indexEntities($entities->all()); }); } }