mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-02 14:47:35 +02:00
[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)
This commit is contained in:
@@ -311,7 +311,7 @@ function getSimpleHTMLDOMCached($url,
|
|||||||
$time = $cache->getTime();
|
$time = $cache->getTime();
|
||||||
if($time !== false
|
if($time !== false
|
||||||
&& (time() - $duration < $time)
|
&& (time() - $duration < $time)
|
||||||
&& Debug::isEnabled()) { // Contents within duration
|
&& !Debug::isEnabled()) { // Contents within duration
|
||||||
$content = $cache->loadData();
|
$content = $cache->loadData();
|
||||||
} else { // Content not within duration
|
} else { // Content not within duration
|
||||||
$content = getContents($url, $header, $opts);
|
$content = getContents($url, $header, $opts);
|
||||||
|
Reference in New Issue
Block a user