response was array, need to check boolean value

This commit is contained in:
terry 2021-08-20 23:07:09 +02:00
parent 7326028c7c
commit 35665402cb
2 changed files with 8 additions and 0 deletions

View File

@ -66,6 +66,10 @@ class GoogleSitemapExtension extends DataExtension
}
}
if (is_array($can) && isset($can[0])) {
return $can[0];
}
return $can;
}

View File

@ -103,6 +103,10 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
$result = parent::canIncludeInGoogleSitemap();
$result = ($this->owner instanceof ErrorPage) ? false : $result;
if (is_array($result) && isset($result[0])) {
return $result[0];
}
return $result;
}