Skip to content

Conversation

alexw23
Copy link

@alexw23 alexw23 commented May 20, 2017

For use with IAM EC2/ECS/Task Roles

It looks like you had done this - however if statements don't work if the key is not set, a better method is to use array_key_exists

@patrickcarlohickman
Copy link
Contributor

Thanks for taking the time to make a PR!

Would you mind changing those to !empty() checks?

The current code prevents creating the credentials if key or secret are false-y, but as you've seen, will throw an exception if they're not defined at all.

Your update to array_key_exists() will prevent the exception from occurring, but does not prevent the credentials from being set if key or secret are false-y.

A change to !empty() will protect against both scenarios.

Thanks again.

@patrickcarlohickman
Copy link
Contributor

This functionality has been included in the latest release with the empty() checks. Thank you for your suggestion!

iSWORD added a commit to iSWORD/laravel-sqs-fifo-queue that referenced this pull request Feb 6, 2025
If the connection is configured without a queue, and the queue is provided while performing a pushRaw(), the operation will throw a warning:
```
DEPRECATED  str_ends_with(): Passing null to parameter shiftonelabs#1 ($haystack) of type string is deprecated
```
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.

2 participants