From 3a18b9f69bf8bb406360bcbf1b2ab416455f1397 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 26 Jul 2017 15:22:36 +0100 Subject: [PATCH] FIX If BlogPost has date field, return it in getDate --- code/model/BlogPost.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/model/BlogPost.php b/code/model/BlogPost.php index 7e6ac15..1d7fe0b 100644 --- a/code/model/BlogPost.php +++ b/code/model/BlogPost.php @@ -693,6 +693,9 @@ class BlogPost extends Page */ public function getDate() { + if ($this->hasDatabaseField('Date')) { + return $this->getField('Date'); + } return !empty($this->PublishDate) ? $this->PublishDate : null; }