mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 23:29:56 +03:00
fix: error when passing null values
This bug was introduced by me when refactoring the http client. Fixes: Fatal error: Uncaught TypeError: Argument 2 passed to getContents() must be of the type array, null given
This commit is contained in:
parent
3476b06ee0
commit
f5a51038cc
1 changed files with 5 additions and 1 deletions
|
@ -252,7 +252,11 @@ function getSimpleHTMLDOMCached($url,
|
|||
&& !Debug::isEnabled()) { // Contents within duration
|
||||
$content = $cache->loadData();
|
||||
} else { // Content not within duration
|
||||
$content = getContents($url, $header, $opts);
|
||||
$content = getContents(
|
||||
$url,
|
||||
$header ?? [],
|
||||
$opts ?? []
|
||||
);
|
||||
if($content !== false) {
|
||||
$cache->saveData($content);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue