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 committed by Sam Minnée
parent 7383c1bce9
commit 4f3d3fdbab

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();
}
}
/**