mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
BUG Fix issue with populateDefault breaking during dev/build
This commit is contained in:
parent
9a56f5aabf
commit
f97119941e
@ -50,7 +50,10 @@ class BlogEntry extends Page {
|
||||
parent::populateDefaults();
|
||||
|
||||
$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));
|
||||
$this->setField('Author', Member::currentUser() ? Member::currentUser()->getName() : '');
|
||||
|
||||
if(Security::database_is_ready() && ($member = Member::currentUser())) {
|
||||
$this->setField('Author', $member->getName());
|
||||
}
|
||||
}
|
||||
|
||||
function getCMSFields() {
|
||||
|
Loading…
Reference in New Issue
Block a user