From e399bc4b929b660908e60f1928014ae6445327f5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 17 Dec 2017 20:14:20 +0100 Subject: 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 --- app/Models/Feed.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 75d9f6d6f..560f7415d 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -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 } -- cgit v1.2.3