From ebb8786cd92e9b26357a30c9b6dbdb72732bfe3e Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Wed, 8 Mar 2017 15:34:54 -0700 Subject: [PATCH] Fixed `Page::expires(0)` that was not getting picked up --- CHANGELOG.md | 1 + system/src/Grav/Common/Page/Page.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4feb2da40..e75f40782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ 1. [](#bugfix) * Fixed a minor bug in Number validation [#1329](https://github.com/getgrav/grav/issues/1329) * Fixed exception when trying to find user account and there is no `user://accounts` folder + * Fixed issue when setting `Page::expires(0)` [Admin #1009](https://github.com/getgrav/grav-plugin-admin/issues/1009) # v1.1.17 ## 02/17/2017 diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 010c906e1..c1bd10606 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -1208,7 +1208,7 @@ class Page $this->expires = $var; } - return empty($this->expires) ? Grav::instance()['config']->get('system.pages.expires') : $this->expires; + return !isset($this->expires) ? Grav::instance()['config']->get('system.pages.expires') : $this->expires; } /**