FIX BlogPost::onBeforePublish() should also trigger parent::onBeforePublish() if exists

e.g. if Page::onBeforePublish() exists.
This commit is contained in:
Christopher Darling 2021-05-19 14:46:13 +01:00 committed by GitHub
parent bf666edf7e
commit 2b3309468c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -493,6 +493,10 @@ class BlogPost extends Page
*/
public function onBeforePublish()
{
if (method_exists(get_parent_class($this), 'onBeforePublish')) {
parent::onBeforePublish();
}
/**
* @var DBDatetime $publishDate
*/