Skip to content

Commit cabe6d9

Browse files
committed
Merge pull request php-curl-class#167 from zachborboa/master
Clean up
2 parents bec3cfa + bad2dac commit cabe6d9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "Zach Borboa"
1010
}
1111
],
12-
"version": "3.4.4",
12+
"version": "3.4.5",
1313
"require": {
1414
"php": ">=5.3",
1515
"ext-curl": "*"

src/Curl/Curl.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
class Curl
66
{
7-
const VERSION = '3.4.4';
7+
const VERSION = '3.4.5';
88
const DEFAULT_TIMEOUT = 30;
99

1010
public $curl;
@@ -488,7 +488,8 @@ private function parseHeaders($raw_headers)
488488
$raw_headers = preg_split('/\r\n/', $raw_headers, null, PREG_SPLIT_NO_EMPTY);
489489
$http_headers = new CaseInsensitiveArray();
490490

491-
for ($i = 1; $i < count($raw_headers); $i++) {
491+
$raw_headers_count = count($raw_headers);
492+
for ($i = 1; $i < $raw_headers_count; $i++) {
492493
list($key, $value) = explode(':', $raw_headers[$i], 2);
493494
$key = trim($key);
494495
$value = trim($value);

src/Curl/MultiCurl.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ public function addDownload($url, $mixed_filename)
4646
$curl = new Curl();
4747
$curl->setURL($url);
4848

49-
$callback = false;
5049
if (is_callable($mixed_filename)) {
5150
$callback = $mixed_filename;
5251
$curl->download_complete_function = $callback;

0 commit comments

Comments
 (0)