Alexandre Alapetite authored and GitHub committed 2017-12-17 20:14:20 +01:00
1 parent be3ed001a4
commit e399bc4b92
2 files changed
+5 -3

No files matched your search

+3 -1
View File
@@ -491,7 +491,9 @@ class FreshRSS_Feed extends Minz_Model {
CURLOPT_USERAGENT => FRESHRSS_USERAGENT,
CURLOPT_MAXREDIRS => 10,
));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //Keep option separated for open_basedir bug
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
}
+2 -2
View File
@@ -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