-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Unable to save subscription checkbox on Admin customer save #6811
Unable to save subscription checkbox on Admin customer save #6811
Conversation
After PHPunit check i changed the if statement, by removing the casting of the Post parameter and change the if statement accordingly |
@rich1990 Thank you for the contribution. |
@vrann Yes with my change works! if you asking why is a string, ask to the guy who wrote the form :) |
@rich1990 ok, I see, I debugged it and it works good. Will be merging. |
…save #6811 - update test according to the way UI works
…save #6811 - update test according to the way UI works
@rich1990 Thank you for contribution! |
Preconditions
Default Magento code base with sample data.
Steps to reproduce
the "Subscribed to Newsletter" will be always 'checked' because the condition of the if is clearly wrong
Actual and Expected result
To make sure that everybody involved in the fix are on the same page, precisely describe the result you expected to get and the result you actually observed after performing the steps.
Expected result:
It would be expect to see the "Subscribed to Newsletter" checkbox being saved correctly
Additional information
The change is fairy simple, in the if statement before was comparing with false as a string, so when getting the the value from the post, i make sure i cast it with (bool).
Then just check is !== false