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,9 +109,12 @@ class BlogEntry extends Page {
|
|||||||
* Get the sidebar from the BlogHolder.
|
* Get the sidebar from the BlogHolder.
|
||||||
*/
|
*/
|
||||||
function SideBar() {
|
function SideBar() {
|
||||||
|
if(method_exists($this->Parent(), 'SideBar')) {
|
||||||
return $this->getParent()->SideBar();
|
return $this->getParent()->SideBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function Content() {
|
function Content() {
|
||||||
if(self::$allow_wysiwyg_editing) {
|
if(self::$allow_wysiwyg_editing) {
|
||||||
return $this->getField('Content');
|
return $this->getField('Content');
|
||||||
|
Loading…
Reference in New Issue
Block a user