FIX: Soften coupling to SiteTree

The SiteTree link still exists but the module
will work if SiteTree isn’t installed.
This commit is contained in:
Sam Minnee 2017-05-05 11:20:53 +12:00
parent 9b48a30e2b
commit 8ee61e82b5
1 changed files with 3 additions and 1 deletions

View File

@ -268,7 +268,9 @@ abstract class SilverStripeContext extends MinkContext implements SilverStripeAw
}
DataObject::flush_and_destroy_cache();
DataObject::reset();
SiteTree::reset();
if (class_exists(SiteTree::class)) {
SiteTree::reset();
}
}
/**