mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-03-14 20:21:14 +03: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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue