From 5cf3e59cd5c0f2f6de5cc2b8c059b78b1f4d0500 Mon Sep 17 00:00:00 2001 From: Brecht Cloetens Date: Wed, 10 Apr 2024 14:49:29 +0200 Subject: [PATCH] Fix for issue #470 --- src/services/SitemapService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/SitemapService.php b/src/services/SitemapService.php index 54420f6..a8f6c06 100644 --- a/src/services/SitemapService.php +++ b/src/services/SitemapService.php @@ -556,7 +556,7 @@ private function _getPageCount (Element $type, $id) */ private function _setCriteriaIdByType ($criteria, Element $type, $id) { - switch ($type::class) { + switch (get_class($type)) { case 'craft\\elements\\Entry': $criteria->sectionId = $id; break;