A free, self-hostable news aggregator…
Fix disabling proxy (#5082)
Alexandre Alapetite64d68a691c03
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.phpindex 3ef3af67d..2bef85f0e 100644--- a/app/Controllers/feedController.php+++ b/app/Controllers/feedController.php@@ -172,7 +172,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {$proxy_address = Minz_Request::param('curl_params', '');$proxy_type = Minz_Request::param('proxy_type', '');$opts = [];- if ($proxy_address !== '' && $proxy_type !== '' && in_array($proxy_type, [0, 2, 4, 5, 6, 7])) {+ if ($proxy_type !== '') {$opts[CURLOPT_PROXY] = $proxy_address;$opts[CURLOPT_PROXYTYPE] = intval($proxy_type);}diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.phpindex c1acfd958..b2ee046d9 100644--- a/app/Controllers/subscriptionController.php+++ b/app/Controllers/subscriptionController.php@@ -147,7 +147,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController {$proxy_address = Minz_Request::param('curl_params', '');$proxy_type = Minz_Request::param('proxy_type', '');$opts = [];- if ($proxy_address !== '' && $proxy_type !== '' && in_array($proxy_type, [0, 2, 4, 5, 6, 7])) {+ if ($proxy_type !== '') {$opts[CURLOPT_PROXY] = $proxy_address;$opts[CURLOPT_PROXYTYPE] = intval($proxy_type);}