Skip to content

Commit ab0a1f3

Browse files
committed
Fixed StreamDriver
1 parent 29d58da commit ab0a1f3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Drivers/CurlDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ public function exec($url, &$httpStatus, &$contentType, &$errorCode, &$errorMess
9696
$this->maxDownloadSize = $this->proxy->getMaxDownloadSize();
9797

9898
if (PHP_VERSION_ID < 50500) {
99-
$progressCallback = function ($download_size, $downloaded, $upload_size, $uploaded) {
99+
$progressCallback = function ($downloadSize, $downloaded, $uploadSize, $uploaded) {
100100
return $this->abort($downloaded);
101101
};
102102
} else {
103-
$progressCallback = function ($resource, $download_size, $downloaded, $upload_size, $uploaded) {
103+
$progressCallback = function ($resource, $downloadSize, $downloaded, $uploadSize, $uploaded) {
104104
return $this->abort($downloaded);
105105
};
106106
}

src/Drivers/StreamDriver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function exec($url, &$httpStatus, &$contentType, &$errorCode, &$errorMess
141141

142142
$data = fgets($handle, 131072);
143143

144-
$downloaded += strlen($downloaded);
144+
$downloaded += strlen($data);
145145

146146
if ($downloaded > $maxSize) {
147147
$errorCode = 0;

0 commit comments

Comments
 (0)