mirror of
https://github.com/Yubico/yubikey-val.git
synced 2025-02-08 03:54:20 +01:00
Refactor.
- rename $curlopts -> $opts.
This commit is contained in:
parent
5fc6c1c37d
commit
17378733af
@ -115,7 +115,7 @@ function sign($a, $apiKey, $logger)
|
||||
return $hmac;
|
||||
}
|
||||
|
||||
function curl_settings($logger, $ident, $ch, $url, $timeout, $curlopts)
|
||||
function curl_settings($logger, $ident, $ch, $url, $timeout, $opts)
|
||||
{
|
||||
$logger->log(LOG_DEBUG, "$ident adding URL : $url");
|
||||
|
||||
@ -125,13 +125,13 @@ function curl_settings($logger, $ident, $ch, $url, $timeout, $curlopts)
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
||||
curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);
|
||||
|
||||
if (is_array($curlopts) === FALSE)
|
||||
if (is_array($opts) === FALSE)
|
||||
{
|
||||
$logger->log(LOG_WARN, $ident . 'curl options must be an array');
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($curlopts as $key => $val)
|
||||
foreach ($opts as $key => $val)
|
||||
if (curl_setopt($ch, $key, $val) === FALSE)
|
||||
$logger->log(LOG_WARN, "$ident failed to set " . curl_opt_name($key));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user