Skip to content

Commit

Permalink
Remove warning for CURLOPT_FOLLOWLOCATION with open_basedir (FreshRSS…
Browse files Browse the repository at this point in the history
  • Loading branch information
Alkarex authored Dec 17, 2017
1 parent 78c4eb6 commit 89cf772
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/Models/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ function pubSubHubbubSubscribe($state) {
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
}
Expand Down
4 changes: 2 additions & 2 deletions lib/favicons.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89cf772

Please sign in to comment.