I get this error when I click on address book. Everything else seems to be working perfectly.
Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ')' in catalog/controller/account/address.php on line 522
Has anyone else ran into this problem with 2.2.0.0?
Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ')' in catalog/controller/account/address.php on line 522
Has anyone else ran into this problem with 2.2.0.0?
That line 522 check custom field settings:fiveam wrote:I get this error when I click on address book. Everything else seems to be working perfectly.
Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ')' in catalog/controller/account/address.php on line 522
Has anyone else ran into this problem with 2.2.0.0?
Code: Select all
foreach ($custom_fields as $custom_field) {
if (($custom_field['location'] == 'address') && $custom_field['required'] && empty($this->request->post['custom_field'][$custom_field['custom_field_id']])) {
$this->error['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field'), $custom_field['name']);
} 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'])))) {
$this->error['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field_validate'), $custom_field['name']);
}
}
Code: Select all
&& !empty($custom_field['validation'] && $custom_field['location'] == 'address'))
Code: Select all
&& !empty($custom_field['validation']) && $custom_field['location'] == 'address'))
This new test, line 522:fiveam wrote:I tried that change and still get the same exact error.
The error happens whether logged in or not.
Code: Select all
&& !empty($custom_field['validation'] && $custom_field['location'] == 'address'))
you try change to:
Code: Select all
&& !empty($custom_field['validation']) && $custom_field['location'] == 'address')
I have seen the same exact code in customer.php and here is the solution for that - http://forum.opencart.com/viewtopic.php?f=191&t=159399
NEVER take serious; anyone who gives negative impact statements with no ABSOLUTE proof!
OpenCart Helpful Information * Upgrade 1.5 to 2.1 * Upgrade 2.1 to 2.2
"Why do people NEVER have enough time to do it right but ALWAYS enough time to do it over?"
DO NOT EVER GIVE SOMEONE YOU DON"T KNOW ADMIN ACCESS TO ANYTHING!
I am NOT affiliated with OpenCart
This new test, line 522:
look here
https://github.com/waqasjawed/opencart/ ... a96e215bd9
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'])))) {
Code: Select all
you try change to:
} 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'])))) {
https://github.com/waqasjawed/opencart/ ... a96e215bd9
Confirmed. Replacing line 522 with:
fixes the issue in OC 2.2.
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'])))) {
Hello,williamhazel wrote:Confirmed. Replacing line 522 with:
fixes the issue in OC 2.2.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'])))) {
I just came across this error and tried the steps after going through the thread, but the issue persists. I still get the below when I click on Address Book on the website:
Parse error: syntax error, unexpected '&&' (T_BOOLEAN_AND), expecting ')' in /home/blingssf/public_html/DBTEST/catalog/controller/account/address.php on line 522
Am I missing something?? Please help!!
Thanks!
BeeBee
When the going gets weird, the weird turn Pro!!
-----------------------------beebee wrote:Hello,williamhazel wrote:Confirmed. Replacing line 522 with:
fixes the issue in OC 2.2.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'])))) {
I just came across this error and tried the steps after going through the thread, but the issue persists. I still get the below when I click on Address Book on the website:
Parse error: syntax error, unexpected '&&' (T_BOOLEAN_AND), expecting ')' in /home/blingssf/public_html/DBTEST/catalog/controller/account/address.php on line 522
Am I missing something?? Please help!!
Thanks!
I don't know what happened, but after a few more tries it worked. Thanks peeps!
BeeBee
When the going gets weird, the weird turn Pro!!
Who is online
Users browsing this forum: No registered users and 20 guests