[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:
Thomas 2021-02-09 13:40:16 +01:00 committed by GitHub
parent 809343ed06
commit 771b851b52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);