aboutsummaryrefslogtreecommitdiff
path: root/lib/favicons.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2017-12-17 20:14:20 +0100
committerGravatar GitHub <noreply@github.com> 2017-12-17 20:14:20 +0100
commite399bc4b929b660908e60f1928014ae6445327f5 (patch)
treee65167a762755522d52fdc3424c1138e18a449cf /lib/favicons.php
parentbe3ed001a4803b4279c34249f20ebffc13c8cc9b (diff)
Remove warning for CURLOPT_FOLLOWLOCATION with open_basedir (#1734)
For PHP 5.6.0- http://www.php.net/ChangeLog-5.php#5.6.0 https://bugs.php.net/bug.php?id=65646 https://github.com/FreshRSS/FreshRSS/pull/1733 https://github.com/FreshRSS/FreshRSS/pull/1657 https://github.com/FreshRSS/FreshRSS/issues/1655
Diffstat (limited to 'lib/favicons.php')
-rw-r--r--lib/favicons.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/favicons.php b/lib/favicons.php
index 75e40900a..fe2e65f1f 100644
--- a/lib/favicons.php
+++ b/lib/favicons.php
@@ -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