mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
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 (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 -------------- */
|
||||
|
Loading…
Reference in New Issue
Block a user