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.
2 parents fed1c20 + e4eb0ae commit 72ee357Copy full SHA for 72ee357
php/example_code/s3/GettingStartedWithS3.php
@@ -148,7 +148,7 @@ public function runExample()
148
$check = $this->s3client->listObjectsV2([
149
'Bucket' => $this->bucketName,
150
]);
151
- if (count($check) <= 0) {
+ if (isset($check['Contents']) && count($check['Contents']) > 0) {
152
throw new Exception("Bucket wasn't empty.");
153
}
154
echo "Deleted all objects and folders from $this->bucketName.\n";
0 commit comments