aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-06-05 07:55:53 +0000
committerMario <mario@mariovavti.com>2024-06-05 07:55:53 +0000
commit78ab2e33ef569f7d9809854f4d315ec0987f480d (patch)
treed99ec64d938836dfdf65e54e212d9f922bbbaa53
parenta4d63ab9a35a3e3c5e128e266e5ddc3c2c6d2e8e (diff)
parentc009c5f43ae0291d0ce0e44b54cd82d50bd3d72b (diff)
downloadvolse-hubzilla-78ab2e33ef569f7d9809854f4d315ec0987f480d.tar.gz
volse-hubzilla-78ab2e33ef569f7d9809854f4d315ec0987f480d.tar.bz2
volse-hubzilla-78ab2e33ef569f7d9809854f4d315ec0987f480d.zip
Merge branch 'fetch-url-default-timeout' into 'dev'
Fix default timeouts for z_(fetch|post)_url. See merge request hubzilla/core!2132
-rw-r--r--include/network.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/network.php b/include/network.php
index a7a11ff6e..1978eb868 100644
--- a/include/network.php
+++ b/include/network.php
@@ -116,7 +116,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
}
else {
$curl_time = intval(@Config::Get('system','curl_timeout'));
- @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
+ @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== 0) ? $curl_time : 60));
}
if(x($opts,'connecttimeout') && intval($opts['connecttimeout'])) {
@@ -124,7 +124,7 @@ function z_fetch_url($url, $binary = false, $redirects = 0, $opts = array()) {
}
else {
$curl_contime = intval(@Config::Get('system','curl_connecttimeout'));
- @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (($curl_contime !== false) ? $curl_contime : 30));
+ @curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, (($curl_contime !== 0) ? $curl_contime : 30));
}
if(x($opts,'http_auth')) {
@@ -298,7 +298,7 @@ function z_post_url($url, $params, $redirects = 0, $opts = array()) {
}
else {
$curl_time = intval(@Config::Get('system','curl_timeout'));
- @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
+ @curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== 0) ? $curl_time : 60));
}
if(x($opts,'http_auth')) {