From 771b851b52bddedc71b621df3132dbfa6b3800b8 Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 9 Feb 2021 13:40:16 +0100 Subject: [PATCH] [contents.php] Fix logical error in getSimpleHTMLDOMCached function (#1974) Previously content was only loaded from cache when debug mode was enabled (the opposite of the expected behavior) --- lib/contents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/contents.php b/lib/contents.php index 21d81e60..797c6125 100644 --- a/lib/contents.php +++ b/lib/contents.php @@ -311,7 +311,7 @@ function getSimpleHTMLDOMCached($url, $time = $cache->getTime(); if($time !== false && (time() - $duration < $time) - && Debug::isEnabled()) { // Contents within duration + && !Debug::isEnabled()) { // Contents within duration $content = $cache->loadData(); } else { // Content not within duration $content = getContents($url, $header, $opts);