From fd433c09db0286bedacba30d8a90682ead1d9de4 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 21 Dec 2020 16:34:25 +0300 Subject: [PATCH] fix(core): fix issues with fetch entries collection. --- app/Controllers/SitemapController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Controllers/SitemapController.php b/app/Controllers/SitemapController.php index 3b409ae..0032e43 100644 --- a/app/Controllers/SitemapController.php +++ b/app/Controllers/SitemapController.php @@ -37,8 +37,11 @@ public function index(Request $request, Response $response) : Response { $sitemap = []; - $entries = arrays(flextype('entries')->fetch('', ['collection' => true, 'depth' => '>0']))->sortBy('modified_at', 'ASC')->all(); - + $entries = flextype('entries') + ->fetch('', ['collection' => true, 'find' => ['depth' => '> 0']]) + ->sortBy('modified_at', 'asc') + ->all(); + foreach ($entries as $entry) { // Check entry visibility field