mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Merge pull request #341 from tractorcow/pulls/fix-phpcompat-33
BUG Fix regression in #312 in PHP 5.3
This commit is contained in:
commit
797c8ee45b
@ -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(
|
||||
|
@ -78,5 +78,9 @@ class BlogPostTest extends SapphireTest
|
||||
Config::inst()->update('BlogPost', 'restrict_authors_to_group', 'BlogUsers');
|
||||
|
||||
$this->assertEquals(3, $blogpost->getCandidateAuthors()->count());
|
||||
|
||||
// Test cms field is generated
|
||||
$fields = $blogpost->getCMSFields();
|
||||
$this->assertNotEmpty($fields->dataFieldByName('Authors'));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user