[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:
parent
809343ed06
commit
771b851b52
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue