mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUGFIX If IsOwner method doesn't exist on parent object in BlogEntry::IsOwner(), don't attempt to call it
This commit is contained in:
parent
0122ac9e37
commit
f41973b838
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user