mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
response was array, need to check boolean value
This commit is contained in:
parent
7326028c7c
commit
35665402cb
@ -66,6 +66,10 @@ class GoogleSitemapExtension extends DataExtension
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($can) && isset($can[0])) {
|
||||
return $can[0];
|
||||
}
|
||||
|
||||
return $can;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user