Skip to content

Commit

Permalink
Merge pull request #2 from neoxue/master
Browse files Browse the repository at this point in the history
bugfix httpheader warning
  • Loading branch information
cui-liang authored Sep 3, 2020
2 parents abdba7c + af56035 commit 1a1dc01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function doRequest($requestbody, $opts) {
];
$options[CURLOPT_TIMEOUT] = empty($opts["timeout"])? 5:$opts["timeout"];
$options[CURLOPT_CUSTOMREQUEST] = empty($opts['method'])? 'GET':$opts['method'];
$options[CURLOPT_HTTPHEADER] = array_merge($options[CURLOPT_HTTPHEADER], $opts[CURLOPT_HTTPHEADER]);
$options[CURLOPT_HTTPHEADER] = !empty($opts[CURLOPT_HTTPHEADER]) ? array_merge($options[CURLOPT_HTTPHEADER], $opts[CURLOPT_HTTPHEADER]) : $options[CURLOPT_HTTPHEADER];
$curl = curl_init();
curl_setopt_array($curl, $options);
$result = curl_exec($curl);
Expand Down

0 comments on commit 1a1dc01

Please sign in to comment.