Post by phil-smiler » Sun Jul 03, 2016 3:09 am

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
Last edited by phil-smiler on Mon Jul 04, 2016 6:05 pm, edited 1 time in total.

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm

Post by straightlight » Mon Jul 04, 2016 7:38 am

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'])))) {

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by phil-smiler » Mon Jul 04, 2016 6:05 pm

Thanks so much that has done the trick i will change it to solved

Cheers again

Phil

Active Member

Posts

Joined
Tue Jul 12, 2011 5:17 pm
Who is online

Users browsing this forum: No registered users and 5 guests