mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-29 19:54:49 +00:00
Merge pull request #241 from zachborboa/master
Remove unneeded array_map() and array_keys()
This commit is contained in:
+2
-4
@@ -663,11 +663,9 @@ class Curl
|
||||
$this->headers[$key] = $value;
|
||||
$headers = array();
|
||||
foreach ($this->headers as $key => $value) {
|
||||
$headers[$key] = $value;
|
||||
$headers[] = $key . ': ' . $value;
|
||||
}
|
||||
$this->setOpt(CURLOPT_HTTPHEADER, array_map(function($value, $key) {
|
||||
return $key . ': ' . $value;
|
||||
}, $headers, array_keys($headers)));
|
||||
$this->setOpt(CURLOPT_HTTPHEADER, $headers);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user