From 8398c8e1994ea430c1b7e1dfd0277ef9e232e2e5 Mon Sep 17 00:00:00 2001 From: Phill Price Date: Thu, 23 Oct 2014 21:58:58 +0100 Subject: [PATCH] Update BlogEntry.php Can't use $this for controller here - Using controller::curr() instead --- code/BlogEntry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/BlogEntry.php b/code/BlogEntry.php index cb301ab..b43b852 100644 --- a/code/BlogEntry.php +++ b/code/BlogEntry.php @@ -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() : '');