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

Check settings exists before hooking for sync #2

Merged
merged 1 commit into from
Jul 24, 2020
Merged

Check settings exists before hooking for sync #2

merged 1 commit into from
Jul 24, 2020

Conversation

PatelUtkarsh
Copy link
Contributor

Fixes fatal error on deleting an attachment when plugin is activated without settings in place.

PHP Fatal error:  Uncaught InvalidArgumentException: Missing required client configuration options: 
region: (string)
  A "region" configuration value is required for the "s3" service
  (e.g., "us-west-2"). A list of available public regions and endpoints can be
  found at http://docs.aws.amazon.com/general/latest/gr/rande.html. in /wp-content/plugins/s3-media-sync/vendor/aws/aws-sdk-php/src/ClientResolver.php:387
Stack trace:
#0 /wp-content/plugins/s3-media-sync/vendor/aws/aws-sdk-php/src/ClientResolver.php(283): Aws\ClientResolver->throwRequired(Array)
#1 wp-content/plugins/s3-media-sync/vendor/aws/aws-sdk-php/src/AwsClient.php(174): Aws\ClientResolver->resolve(Array, Object(Aws\HandlerList))
#2 wp-content/plugins/s3-media-sync/vendor/aws/aws-sdk-php/src/S3/S3Client.php(283): Aws\AwsClient->__construc in /wp-content/plugins/s3-media-sync/vendor/aws/aws-sdk-php/src/ClientResolver.php on line 387

Copy link

@alexiskulash alexiskulash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR has passed VIP code review. You can now merge into master to deploy when you are ready. Find out more in our documentation.

@alexiskulash alexiskulash merged commit 69427f4 into Automattic:master Jul 24, 2020
@PatelUtkarsh PatelUtkarsh deleted the fix/delete-attachment-fatal branch July 24, 2020 14:31
@GaryJones GaryJones added this to the 1.1.0 milestone Jan 1, 2025
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.

3 participants