mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
check if SiteTree exists before getting pages.
This commit is contained in:
parent
39828c215d
commit
e98598ac79
@ -143,7 +143,7 @@ class GoogleSitemap extends Controller {
|
||||
$filter = "{$bt}ShowInSearch{$bt} = 1";
|
||||
}
|
||||
|
||||
$pages = Versioned::get_by_stage('SiteTree', 'Live', $filter);
|
||||
$pages = class_exists('SiteTree') ? Versioned::get_by_stage('SiteTree', 'Live', $filter) : false;
|
||||
|
||||
$newPages = new ArrayList();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user