From f41973b838dd960471093961b7b9d28475b6d377 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 1 Jul 2009 04:24:42 +0000 Subject: [PATCH] BUGFIX If IsOwner method doesn't exist on parent object in BlogEntry::IsOwner(), don't attempt to call it --- code/BlogEntry.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/BlogEntry.php b/code/BlogEntry.php index bb73f93..c2fbf8e 100644 --- a/code/BlogEntry.php +++ b/code/BlogEntry.php @@ -168,8 +168,11 @@ class BlogEntry extends Page { } function IsOwner() { - return $this->Parent()->IsOwner(); + if(method_exists($this->Parent(), 'IsOwner')) { + return $this->Parent()->IsOwner(); + } } + /** * Call this to enable WYSIWYG editing on your blog entries. * By default the blog uses BBCode