fix: cast variables (#192)

This commit is contained in:
Will Rossiter 2023-10-28 07:59:55 +13:00
parent 523d196d12
commit def6be347c
No known key found for this signature in database
GPG Key ID: 7FD2A809B22259EF

View File

@ -236,7 +236,8 @@ class GoogleSitemap
*/
public function getItems($class, $page = 1)
{
//normalise the class name
$page = (int) $page;
try {
$reflectionClass = new ReflectionClass($class);
$class = $reflectionClass->getName();
@ -246,7 +247,7 @@ class GoogleSitemap
}
$output = new ArrayList();
$count = Config::inst()->get(__CLASS__, 'objects_per_sitemap');
$count = (int) Config::inst()->get(__CLASS__, 'objects_per_sitemap');
$filter = Config::inst()->get(__CLASS__, 'use_show_in_search');
$redirector = Config::inst()->get(__CLASS__, 'exclude_redirector_pages');