mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50:11 +00:00
Update false evaluations
=== false and !== false to is_null where appropriate.
This commit is contained in:
parent
09d798ba77
commit
cadfef63c4
7 changed files with 13 additions and 9 deletions
|
@ -126,6 +126,7 @@ function z_fetch_url($url, $binary = false, &$redirects = 0, $opts = array())
|
|||
if (x($opts, 'timeout')) {
|
||||
@curl_setopt($ch, CURLOPT_TIMEOUT, $opts['timeout']);
|
||||
} else {
|
||||
// if Config::get returns null, intval will be 0 which will also evaluate to false
|
||||
$curl_time = intval(Config::get('system', 'curl_timeout'));
|
||||
@curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
|
||||
}
|
||||
|
@ -302,6 +303,7 @@ function post_url($url, $params, $headers = null, &$redirects = 0, $timeout = 0)
|
|||
if (intval($timeout)) {
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
|
||||
} else {
|
||||
// if Config::get returns null, intval will be 0 which will also evaluate to false
|
||||
$curl_time = intval(Config::get('system', 'curl_timeout'));
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, (($curl_time !== false) ? $curl_time : 60));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue