From 41dc5173009108be5be6f516783a12a2c1fa1a26 Mon Sep 17 00:00:00 2001 From: Giuseppe Criscione Date: Sun, 7 Apr 2019 16:33:48 +0200 Subject: [PATCH] Fix unpublished pages status being overridden by publish dates --- formwork/Core/Page.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/formwork/Core/Page.php b/formwork/Core/Page.php index 7fad1b42..c6a7a2f7 100755 --- a/formwork/Core/Page.php +++ b/formwork/Core/Page.php @@ -467,11 +467,11 @@ class Page extends AbstractPage $this->published = $this->data['published']; if ($this->has('publish-date')) { - $this->published = strtotime($this->get('publish-date')) < time(); + $this->published = $this->published && strtotime($this->get('publish-date')) < time(); } if ($this->has('unpublish-date')) { - $this->published = strtotime($this->get('unpublish-date')) > time(); + $this->published = $this->published && strtotime($this->get('unpublish-date')) > time(); } $this->routable = $this->data['routable'];