mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX SiteTreeSubsites::alternateSiteConfig() now returns false if there's no SubsiteID set on SiteTree
This commit is contained in:
parent
7e84789509
commit
69033011af
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user