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

Fixed testing mailer with API key #2708

Merged
merged 1 commit into from
Oct 12, 2016
Merged

Conversation

alanhartless
Copy link
Contributor

Q A
Bug fix? y
New feature? n
Related user documentation PR URL na
Related developer documentation PR URL na
Issues addressed (#s or URLs) #2535
BC breaks? n
Deprecations? n

Description:

is_callable had the mailer and method set as arguments rather than array and thus didn't properly check if setApiKey was callable leading to the Cannot create instance of \SparkPost\SparkPost while API key is NULL Log data: !! Cannot create instance of \SparkPost\SparkPost while API key is NULL (code: 0) error. Although some instances seem to still return successful tests.

Steps to test this PR:

  1. Use sparkpost transport in Email Configuration
  2. Add api key
  3. Click test connection

Steps to reproduce the bug:

  1. Repeat above and may get the error noted

@alanhartless alanhartless added bug Issues or PR's relating to bugs ready-to-test PR's that are ready to test labels Oct 11, 2016
@alanhartless alanhartless added this to the 2.2.1 milestone Oct 11, 2016
@escopecz
Copy link
Sponsor Member

escopecz commented Oct 11, 2016

I don't have a Sparkpost key to test with, but the PHP docs say that it is possible to use an array as the function attribute:

This can check that a simple variable contains the name of a valid function, or that an array contains a properly encoded object and function name.

👍

@escopecz escopecz added the pending-test-confirmation PR's that require one test before they can be merged label Oct 11, 2016
Copy link
Contributor

@virlatinus virlatinus left a comment

Choose a reason for hiding this comment

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

Tested and it worked!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs pending-test-confirmation PR's that require one test before they can be merged ready-to-test PR's that are ready to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants