Skip to content

Conversation

@rghvgrv
Copy link
Contributor

@rghvgrv rghvgrv commented Jul 24, 2025

Bug#7535

This pull request is for

  1. $check is the result of $this->s3client->listObjectsV2(), which returns an array with metadata about the bucket and, if present, a Contents key containing the objects.
  2. count($check) will always be at least 1 (because it's an array with metadata), even if the bucket is empty.
  3. To check if the bucket is empty, you should check if the Contents key exists and if it contains any objects.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the PHP This issue relates to the AWS SDK for PHP label Jul 24, 2025
@brmur brmur requested a review from beqqrry-aws July 25, 2025 15:29
@beqqrry-aws beqqrry-aws added Bug An update to fix incorrect code or typos. On Call Review needed This work needs an on-call review labels Jul 28, 2025
@beqqrry-aws beqqrry-aws changed the title [Bug#7535] : Message Fix PHP: [Bug#7535] : Fix message and logic Jul 28, 2025
@rghvgrv
Copy link
Contributor Author

rghvgrv commented Jul 28, 2025

@beqqrry-aws how we can close this ? Do I need to join any call or will it be internal ?

@scmacdon scmacdon added On Call Review complete On call review complete and removed On Call Review needed This work needs an on-call review labels Jul 28, 2025
@scmacdon scmacdon merged commit e4eb0ae into awsdocs:main Jul 28, 2025
20 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug An update to fix incorrect code or typos. On Call Review complete On call review complete PHP This issue relates to the AWS SDK for PHP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants