diff --git a/.changes/nextrelease/multipart-falsy-values.json b/.changes/nextrelease/multipart-falsy-values.json new file mode 100644 index 0000000000..58d0cad1d5 --- /dev/null +++ b/.changes/nextrelease/multipart-falsy-values.json @@ -0,0 +1,7 @@ +[ + { + "type": "bugfix", + "category": "Multipart", + "description": "Fixes bug in `AbstractUploadManager` where valid falsy values are excluded." + } +] diff --git a/src/Multipart/AbstractUploadManager.php b/src/Multipart/AbstractUploadManager.php index adc356ede4..96848fd6ca 100644 --- a/src/Multipart/AbstractUploadManager.php +++ b/src/Multipart/AbstractUploadManager.php @@ -240,7 +240,7 @@ private function determineState(): UploadState $id = [$required['upload_id'] => null]; unset($required['upload_id']); foreach ($required as $key => $param) { - if (!$this->config[$key]) { + if (!isset($this->config[$key]) || $this->config[$key] === '') { throw new IAE('You must provide a value for "' . $key . '" in ' . 'your config for the MultipartUploader for ' . $this->client->getApi()->getServiceFullName() . '.');