From 32a0b57bc224f68f3ff8613a96338d441decc987 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 6 Jul 2019 16:32:33 +0300 Subject: [PATCH] Flextype Core: Entries - issue with possible boolean false result from Filesystem::getTimestamp() inside method fetchAll() - 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 46d9256b..71975571 100755 --- a/flextype/core/Entries.php +++ b/flextype/core/Entries.php @@ -230,7 +230,11 @@ class Entries // ignore ... } else { if ($current_entry['type'] == 'dir' && Filesystem::has($current_entry['path'] . '/entry.json')) { - $_entries_ids .= 'entry:' . ltrim(rtrim(str_replace(PATH['entries'], '', $current_entry['path']), '/'), '/') . ' timestamp:' . Filesystem::getTimestamp($current_entry['path'] . '/entry.json') . ' '; + if ($timestamp = Filesystem::getTimestamp($current_entry['path'] . '/entry.json')) { + $_entries_ids .= 'entry:' . ltrim(rtrim(str_replace(PATH['entries'], '', $current_entry['path']), '/'), '/') . ' timestamp:' . $timestamp; + } else { + $_entries_ids .= 'entry:' . ltrim(rtrim(str_replace(PATH['entries'], '', $current_entry['path']), '/'), '/'); + } } } }