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

"Undefined variable $success" if mailchimp isnt defined. #93

Open
ccbeyer opened this issue Oct 25, 2017 · 2 comments
Open

"Undefined variable $success" if mailchimp isnt defined. #93

ccbeyer opened this issue Oct 25, 2017 · 2 comments

Comments

@ccbeyer
Copy link

ccbeyer commented Oct 25, 2017

Currently, I have the mailchimp toggle disabled. The code in Formerly_SubmissionsService.php line 40 says if ($form->mailchimp && isset($submission->{$emailHandle})) { and in that if block, $success is set to either true or false. Then, outside of that if block (line 67), $success is returned. In my case, since mailchip isnt enable, i believe thats causing $form->mailchimp to return false, and therefore $success is not being set and is null, which is making Craft CMS throw the error "Undefined variable $success". Why is success being returned if its not always defined?

To add more detail, i dont currently have any formerly settings in the craft/config/general.php file, but that shouldn't effect this right?

@zacharybrady
Copy link

Having this issue as well. Hacked myself a solution by moving $success = true; to outside if ($form->mailchimp && isset($submission->{$emailHandle})) {...}

@portnull
Copy link

Thanks @zacharybrady, that just helped me out as well.

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

No branches or pull requests

3 participants