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

Customer custom field error in registration #2147

Closed
faern opened this issue Oct 29, 2014 · 4 comments
Closed

Customer custom field error in registration #2147

faern opened this issue Oct 29, 2014 · 4 comments

Comments

@faern
Copy link

faern commented Oct 29, 2014

When having custom fields for customer registration (Sales -> Customers -> Custom fields) for either location account OR address, but not for both. Then this error appears upon clicking "Continue" in the register user form:

Notice: Undefined index: address in /home/gardsbut/public_html/shop/catalog/controller/account/register.php on line 281
Fatal error: Unsupported operand types in /home/gardsbut/public_html/shop/catalog/controller/account/register.php on line 281

This is because register.php is only checking for isset($this->request->post['custom_field']), if that is true it concatenate the values ['account'] and ['address'] under that post data but one of them is empty since we only have custom fields for one.

@faern
Copy link
Author

faern commented Oct 29, 2014

Temporary fix is to create a custom field for the other class (account/address) but have it disabled.

@danielkerr
Copy link
Member

try using the master branch

@danielkerr
Copy link
Member

or getting the fixes from there

@qahmad81
Copy link

replace line
if (isset($this->request->post['custom_field'])) {
with this
if (isset($this->request->post['custom_field'])&&is_array($data['custom_field'])) {

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