check if SiteTree exists before adding extension

This commit is contained in:
Jörn Röder 2012-05-11 10:53:46 +02:00
parent e98598ac79
commit 8a41b6fdf2
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ Director::addRules(10, array(
));
// add the extension to pages
Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeDecorator');
if (class_exists('SiteTree')) Object::add_extension('SiteTree', 'GoogleSitemapSiteTreeDecorator');
// if you need to add this to DataObjects include the following in
// your own _config: