|
|
@@ -36,8 +36,8 @@ function downloadHttp(&$url, $curlOptions = array()) {
|
|
|
CURLOPT_USERAGENT => FRESHRSS_USERAGENT,
|
|
|
CURLOPT_MAXREDIRS => 10,
|
|
|
));
|
|
|
- if (ini_get('open_basedir') == '') { // see PHP bug 65646
|
|
|
- curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
|
|
+ if (version_compare(PHP_VERSION, '5.6.0') >= 0 || ini_get('open_basedir') == '') {
|
|
|
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //Keep option separated for open_basedir PHP bug 65646
|
|
|
}
|
|
|
if (defined('CURLOPT_ENCODING')) {
|
|
|
curl_setopt($ch, CURLOPT_ENCODING, ''); //Enable all encodings
|