mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00: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
@ -252,7 +252,11 @@ function getSimpleHTMLDOMCached($url,
|
|||||||
&& !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 ?? []
|
||||||
|
);
|
||||||
if($content !== false) {
|
if($content !== false) {
|
||||||
$cache->saveData($content);
|
$cache->saveData($content);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user