语法错误,意外'&&' (T_BOOLEAN_AND),期待')'在点击客户时在opencart中

时间:2016-03-11 11:32:15

标签: opencart2.x

不知道这意味着什么不是开发人员。我可以访问HTML编辑器(DW),因此如果被告知要做什么可能会改变。

当我点击管理员Opencart中的客户时,我收到此错误。

Parse error: syntax error, unexpected '&&' (T_BOOLEAN_AND), expecting ')' in /var/sites/p/proteinporridgewales.co.uk/public_html/cart/admin/controller/customer/customer.php on line 1105

提前致谢

3 个答案:

答案 0 :(得分:4)

opencart 2.2.0.0中的错误。他们已经更新了他们的主存储库。你也可以直接这样做。这是admin/controller/customer/customer.php

的求解行1105

替换为此行

} 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 了解详情。

答案 1 :(得分:2)

括号在错误的地方......改变

!empty($custom_field['validation'] && $custom_field['location'] == 'address'))

!empty($custom_field['validation']) && $custom_field['location'] == 'address')

答案 2 :(得分:0)

我已经弄清楚了问题,这是错误行1105上的“else if”部分的问题,我已经删除了,只是让if语句离开了右括号。

这样我就可以摆脱错误,并且能够看到客户页面。