Skip to content

Commit 72ee357

Browse files
authored
Merge branch 'main' into patch-1
2 parents fed1c20 + e4eb0ae commit 72ee357

File tree

3 files changed

+180
-76
lines changed

3 files changed

+180
-76
lines changed

php/example_code/s3/GettingStartedWithS3.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function runExample()
148148
$check = $this->s3client->listObjectsV2([
149149
'Bucket' => $this->bucketName,
150150
]);
151-
if (count($check) <= 0) {
151+
if (isset($check['Contents']) && count($check['Contents']) > 0) {
152152
throw new Exception("Bucket wasn't empty.");
153153
}
154154
echo "Deleted all objects and folders from $this->bucketName.\n";

0 commit comments

Comments
 (0)