BUGFIX SiteTreeSubsites::alternateSiteConfig() now returns false if there's no SubsiteID set on SiteTree

This commit is contained in:
Sean Harvey 2010-03-11 21:51:06 +00:00
parent 7e84789509
commit 69033011af

View File

@ -251,6 +251,7 @@ class SiteTreeSubsites extends SiteTreeDecorator {
}
function alternateSiteConfig() {
if(!$this->owner->SubsiteID) return false;
$sc = DataObject::get_one('SiteConfig', 'SubsiteID = ' . $this->owner->SubsiteID);
if(!$sc) {
$sc = new SiteConfig();