mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-05 05:23:55 +00:00
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' => '',
|
'content' => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
// Use file_get_contents if in CLI mode with no root certificates defined
|
// Use file_get_contents() if curl module is not installed
|
||||||
if(php_sapi_name() === 'cli' && empty(ini_get('curl.cainfo'))) {
|
if(! function_exists('curl_version')) {
|
||||||
|
|
||||||
$httpHeaders = '';
|
$httpHeaders = '';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user