BUGFIX: check method SideBar exists in parent before calling it.

This commit is contained in:
carlos barberis 2012-07-18 10:47:28 +12:00
parent bf287d9e77
commit 8c12345695

View File

@ -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');