Page 1 of 1

SOLVED Site map to Address Book getting error message

Posted: Sun Jul 03, 2016 3:09 am
by phil-smiler
Hi firstly i think this a bug if not i am sorry for posting in the wrong place
Opencart version 2.2.
Default be edited theme

Hi i was testing the new site for bugs and iv'e found what i think is a bug.

When you go to site map and then hit address book i get this error


Parse error: syntax error, unexpected '&&' (T_BOOLEAN_AND), expecting ')' in /home3/natur244/public_html/catalog/controller/account/address.php on line 522

anyone got a fix for it?

In fact its doing the same from the accounts page too, deffo a bug

Re: Site map to Address Book getting error message

Posted: Mon Jul 04, 2016 7:38 am
by straightlight
Yes, this has been reported already. In your catalog/controller/account/address.php file,

find:

Code: Select all

} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation'] && $custom_field['location'] == 'address')) && !filter_var($this->request->post['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
replace with:

Code: Select all

} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation']) && $custom_field['location'] == 'address') && !filter_var($this->request->post['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {

Re: Site map to Address Book getting error message

Posted: Mon Jul 04, 2016 6:05 pm
by phil-smiler
Thanks so much that has done the trick i will change it to solved

Cheers again

Phil