fix: properly verify the existence of the curl module
This fixes a bug where it didnt use curl from cli even though it's installed. I believe this preserves the original intention to not require the curl module to be installed. https://github.com/RSS-Bridge/rss-bridge/pull/979
This commit is contained in:
parent
076c413d3e
commit
7bdc53125c
@ -130,8 +130,8 @@ function getContents($url, $header = array(), $opts = array(), $returnHeader = f
|
||||
'content' => '',
|
||||
);
|
||||
|
||||
// Use file_get_contents if in CLI mode with no root certificates defined
|
||||
if(php_sapi_name() === 'cli' && empty(ini_get('curl.cainfo'))) {
|
||||
// Use file_get_contents() if curl module is not installed
|
||||
if(! function_exists('curl_version')) {
|
||||
|
||||
$httpHeaders = '';
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user