From 0ec370ec333050dfd174cb5421a173edf25d6534 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 6 Jul 2019 16:41:07 +0300 Subject: [PATCH] Flextype Core: Entries - issue with possible boolean false result from Filesystem::getTimestamp() inside method fetch() - fixed. #182 --- flextype/core/Entries.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flextype/core/Entries.php b/flextype/core/Entries.php index 71975571..295a4c6d 100755 --- a/flextype/core/Entries.php +++ b/flextype/core/Entries.php @@ -70,7 +70,11 @@ class Entries // Create unique entry cache_id // Entry Cache ID = entry + entry file + entry file time stamp - $entry_cache_id = md5('entry' . $entry_file . Filesystem::getTimestamp($entry_file)); + if ($timestamp = Filesystem::getTimestamp($entry_file)) { + $entry_cache_id = md5('entry' . $entry_file . $timestamp); + } else { + $entry_cache_id = md5('entry' . $entry_file); + } // Try to get the requested entry from cache if ($this->flextype['cache']->contains($entry_cache_id)) {