diff --git a/src/RemoveBg.php b/src/RemoveBg.php index 3e48fb7..68f0ae7 100644 --- a/src/RemoveBg.php +++ b/src/RemoveBg.php @@ -203,6 +203,7 @@ protected function formatBody() switch ($this->imageFormat) { case 'image_file': $index = 0; + $data = []; foreach ($this->body as $key => $value) { $data[$index]['name'] = $key; $data[$index]['contents'] = $value;