Skip to content

Commit

Permalink
[contents.php] Fix logical error in getSimpleHTMLDOMCached function (#…
Browse files Browse the repository at this point in the history
…1974)

Previously content was only loaded from cache when debug mode was enabled (the opposite of the expected behavior)
  • Loading branch information
mightymt authored Feb 9, 2021
1 parent 809343e commit 771b851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 771b851

Please sign in to comment.