We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb58ef5 commit 7c17a71Copy full SHA for 7c17a71
src/Google/Http/MediaFileUpload.php
@@ -165,8 +165,11 @@ private function makePutRequest(RequestInterface $request)
165
166
if (308 == $this->httpResultCode) {
167
// Track the amount uploaded.
168
- $range = explode('-', $response->getHeaderLine('range'));
169
- $this->progress = $range[1] + 1;
+ $range = $response->getHeaderLine('range');
+ if ($range) {
170
+ $range_array = explode('-', $range);
171
+ $this->progress = $range_array[1] + 1;
172
+ }
173
174
// Allow for changing upload URLs.
175
$location = $response->getHeaderLine('location');
0 commit comments