From 6a15dded0efa98efd17c88bbae7cbabe427608f5 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 3 Nov 2015 00:48:49 +0100 Subject: [PATCH] Bugfix: The timeout value of z_fetch_url couldn't be set manually --- include/network.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/include/network.php b/include/network.php index 2815e1ab85..d0217e2a08 100644 --- a/include/network.php +++ b/include/network.php @@ -86,10 +86,9 @@ function z_fetch_url($url,$binary = false, &$redirects = 0, $opts=array()) { if(x($opts,'nobody')){ @curl_setopt($ch, CURLOPT_NOBODY, $opts['nobody']); } - if(intval($timeout)) { - @curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); - } - else { + if(x($opts,'timeout')){ + @curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']); + } else { $curl_time = intval(get_config('system','curl_timeout')); @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60)); } -- 2.39.5