@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | print $nvpStr; |
67 | 67 | exit;*/ |
68 | 68 | curl_setopt($ch, CURLOPT_VERBOSE, 1); |
69 | - curl_setopt($ch, CURLOPT_USERAGENT, 'Dolibarr geturl function'); // set the Dolibarr user agent name |
|
69 | + curl_setopt($ch, CURLOPT_USERAGENT, 'Dolibarr geturl function'); // set the Dolibarr user agent name |
|
70 | 70 | |
71 | 71 | // We use @ here because this may return warning if safe mode is on or open_basedir is on (following location is forbidden when safe mode is on). |
72 | 72 | // We force value to false so we will manage redirection ourself later. |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | // Turning on or off the ssl target certificate |
89 | 89 | if ($ssl_verifypeer < 0) { |
90 | 90 | global $dolibarr_main_prod; |
91 | - $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
91 | + $ssl_verifypeer = ($dolibarr_main_prod ? true : false); |
|
92 | 92 | } |
93 | 93 | if (getDolGlobalString('MAIN_CURL_DISABLE_VERIFYPEER')) { |
94 | 94 | $ssl_verifypeer = 0; |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | // limit size of downloaded files. |
126 | 126 | $maxsize = getDolGlobalInt('MAIN_SECURITY_MAXFILESIZE_DOWNLOADED'); |
127 | 127 | if ($maxsize && defined('CURLOPT_MAXFILESIZE_LARGE')) { |
128 | - curl_setopt($ch, CURLOPT_MAXFILESIZE_LARGE, $maxsize * 1024); // @phan-suppress-current-line PhanTypeMismatchArgumentNullableInternal |
|
128 | + curl_setopt($ch, CURLOPT_MAXFILESIZE_LARGE, $maxsize * 1024); // @phan-suppress-current-line PhanTypeMismatchArgumentNullableInternal |
|
129 | 129 | } |
130 | 130 | if ($maxsize && defined('CURLOPT_MAXFILESIZE')) { |
131 | 131 | curl_setopt($ch, CURLOPT_MAXFILESIZE, $maxsize * 1024); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $array_param = null; |
144 | 144 | curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); // HTTP request is 'PUT' |
145 | 145 | if (!is_array($param)) { |
146 | - parse_str($param, $array_param); // @phan-suppress-current-line PhanPluginConstantVariableNull |
|
146 | + parse_str($param, $array_param); // @phan-suppress-current-line PhanPluginConstantVariableNull |
|
147 | 147 | } else { |
148 | 148 | dol_syslog("parameter param must be a string", LOG_WARNING); |
149 | 149 | $array_param = $param; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | |
247 | 247 | // Getting response from server |
248 | - $response = curl_exec($ch); // return false on error, result on success |
|
248 | + $response = curl_exec($ch); // return false on error, result on success |
|
249 | 249 | |
250 | 250 | $info = curl_getinfo($ch); // Reading of request must be done after sending request |
251 | 251 | $http_code = $info['http_code']; |