From 8c12345695ad556837ba4c6054b9db50f3967237 Mon Sep 17 00:00:00 2001 From: carlos barberis Date: Wed, 18 Jul 2012 10:47:28 +1200 Subject: [PATCH] BUGFIX: check method SideBar exists in parent before calling it. --- code/BlogEntry.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/BlogEntry.php b/code/BlogEntry.php index 2fe2157..292b6e9 100644 --- a/code/BlogEntry.php +++ b/code/BlogEntry.php @@ -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() {