diff --git a/src/XmlSitemapIndexWriter.php b/src/XmlSitemapIndexWriter.php index 170a333..d288439 100644 --- a/src/XmlSitemapIndexWriter.php +++ b/src/XmlSitemapIndexWriter.php @@ -52,7 +52,7 @@ class XmlSitemapIndexWriter extends XmlSitemapWriter { for ($i = 1; $i <= $this->sitemap->chunks; $i++) { $url_options['query']['page'] = $i; $element = array( - 'loc' => Url::fromRoute('xmlsitemap.sitemap_xml', [], $url_options), + 'loc' => Url::fromRoute('xmlsitemap.sitemap_xml', [], $url_options)->toString(), // @todo Use the actual lastmod value of the chunk file. 'lastmod' => gmdate($lastmod_format, REQUEST_TIME), );