MINOR FIX: instances where no SideBarID exists are now avoided
This commit is contained in:
parent
56be6ad6fa
commit
acbce1d507
|
@ -82,8 +82,11 @@ class BlogTree extends Page {
|
||||||
if ($this->InheritSideBar && $this->getParent()) {
|
if ($this->InheritSideBar && $this->getParent()) {
|
||||||
if (method_exists($this->getParent(), 'SideBar')) return $this->getParent()->SideBar();
|
if (method_exists($this->getParent(), 'SideBar')) return $this->getParent()->SideBar();
|
||||||
}
|
}
|
||||||
return DataObject::get_by_id('WidgetArea', $this->SideBarID);
|
|
||||||
// @todo: This segfaults - investigate why then fix: return $this->getComponent('SideBar');
|
if($this->SideBarID){
|
||||||
|
return DataObject::get_by_id('WidgetArea', $this->SideBarID);
|
||||||
|
// @todo: This segfaults - investigate why then fix: return $this->getComponent('SideBar');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------- CMS CONTROL -------------- */
|
/* ----------- CMS CONTROL -------------- */
|
||||||
|
|
Loading…
Reference in New Issue