From efb769d8c263d944bf2883170e65b4d4ce266b68 Mon Sep 17 00:00:00 2001 From: 3Dgoo Date: Mon, 23 Nov 2015 10:14:13 +1030 Subject: [PATCH] Fixing BlogPost getCMSFields bug Fixing bug in `BlogPost` `getCMSFields` where `$this` was being called within the `beforeUpdateCMSFields` function where `$self` should be used. This was causing an error when trying to view / edit a `BlogPost` through the CMS. --- code/model/BlogPost.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/BlogPost.php b/code/model/BlogPost.php index 7e98f2f..2eeb2a2 100644 --- a/code/model/BlogPost.php +++ b/code/model/BlogPost.php @@ -216,7 +216,7 @@ class BlogPost extends Page $authorField = ListboxField::create( 'Authors', _t('BlogPost.Authors', 'Authors'), - $this->getCandidateAuthors()->map()->toArray() + $self->getCandidateAuthors()->map()->toArray() )->setMultiple(true); $authorNames = TextField::create(