Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: S3 StreamWrapper error handling #2372

Merged
merged 7 commits into from
Feb 4, 2022

Conversation

stobrien89
Copy link
Member

Addresses #1967

Attempting to write to a stream that is not explicitly flushed or closed in a script currently results in confusing errors:

w mode:

Fatal error: Uncaught Error: Class 'Aws\Command' not found in /tmp/aws/Aws/AwsClient.php:258

x mode:

Fatal error: Uncaught Error: Class 'Aws\Api\MapShape' not found in /tmp/aws/Aws/Api/Shape.php:47

A similar error is seen in a mode. This happens when the stream's body size has not been determined. Added logic to check for a stream body size of null.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

.changes/nextrelease/enhancement-streamwrapper.json Outdated Show resolved Hide resolved
src/S3/StreamWrapper.php Outdated Show resolved Hide resolved
@SamRemis SamRemis merged commit fbb71b7 into aws:master Feb 4, 2022
SamRemis added a commit to SamRemis/aws-sdk-php that referenced this pull request Feb 4, 2022
SamRemis added a commit to SamRemis/aws-sdk-php that referenced this pull request Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants