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;