Skip to content

Commit 05c6195

Browse files
fix(Multipart): properly handle falsey values like "0" (#3253)
Co-authored-by: Sean O'Brien <60306702+stobrien89@users.noreply.github.com>
1 parent a48ff95 commit 05c6195

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[
2+
{
3+
"type": "bugfix",
4+
"category": "Multipart",
5+
"description": "Fixes bug in `AbstractUploadManager` where valid falsy values are excluded."
6+
}
7+
]

src/Multipart/AbstractUploadManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ private function determineState(): UploadState
240240
$id = [$required['upload_id'] => null];
241241
unset($required['upload_id']);
242242
foreach ($required as $key => $param) {
243-
if (!$this->config[$key]) {
243+
if (!isset($this->config[$key]) || $this->config[$key] === '') {
244244
throw new IAE('You must provide a value for "' . $key . '" in '
245245
. 'your config for the MultipartUploader for '
246246
. $this->client->getApi()->getServiceFullName() . '.');

0 commit comments

Comments
 (0)