Update BlogEntry.php

Can't use $this for controller here - Using controller::curr() instead
This commit is contained in:
Phill Price 2014-10-23 21:58:58 +01:00
parent b831bb87d8
commit 8398c8e199

View File

@ -49,7 +49,7 @@ class BlogEntry extends Page {
public function populateDefaults(){
parent::populateDefaults();
$requestedDevBuild = (stripos($this->request->getURL(), 'dev/build') === 0);
$requestedDevBuild = (stripos(Controller::curr()->request->getURL(), 'dev/build') === 0);
if(!$requestedDevBuild){
$this->setField('Date', date('Y-m-d H:i:s', strtotime('now')));
$this->setField('Author', Member::currentUser() ? Member::currentUser()->getName() : '');