diff --git a/filesystem/Filesystem.php b/filesystem/Filesystem.php index d84b5e900..eaf0d94fe 100644 --- a/filesystem/Filesystem.php +++ b/filesystem/Filesystem.php @@ -152,7 +152,7 @@ class Filesystem extends Object { // Update the image tracking of all pages if($syncLinkTracking) { if(class_exists('SiteTree')) { - $origDisableSubsiteFilter = Subsite::$disable_subsite_filter; + if(class_exists('Subsite')) $origDisableSubsiteFilter = Subsite::$disable_subsite_filter; if(class_exists('Subsite')) Subsite::$disable_subsite_filter = true; foreach(DataObject::get("SiteTree") as $page) { // syncLinkTracking is called by SiteTree::onBeforeWrite().