mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX: check method SideBar exists in parent before calling it.
This commit is contained in:
parent
bf287d9e77
commit
8c12345695
@ -109,7 +109,10 @@ class BlogEntry extends Page {
|
||||
* Get the sidebar from the BlogHolder.
|
||||
*/
|
||||
function SideBar() {
|
||||
return $this->getParent()->SideBar();
|
||||
if(method_exists($this->Parent(), 'SideBar')) {
|
||||
return $this->getParent()->SideBar();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function Content() {
|
||||
|
Loading…
Reference in New Issue
Block a user