OpenCart中的PHP语法错误

OpenCart中的PHP语法错误,php,syntax-error,opencart,Php,Syntax Error,Opencart,我试图在管理面板中访问opencart的customer部分,并收到此消息 解析错误:语法错误,第1105行/var/www/vhosts/cloud9herbals.com/cloud9hemp/dev/admin/controller/customer/customer.php中出现意外的“&&&”(T_BOOLEAN_AND),预期为“') } elseif (($custom_field['type'] == 'text' && !empty($custom_field[

我试图在管理面板中访问opencart的customer部分,并收到此消息

解析错误:语法错误,第1105行/var/www/vhosts/cloud9herbals.com/cloud9hemp/dev/admin/controller/customer/customer.php中出现意外的“&&&”(T_BOOLEAN_AND),预期为“')

} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation'] && $custom_field['location'] == 'address')) && !filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
这是第1105行的代码

} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation'] && $custom_field['location'] == 'address')) && !filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
如果这还不够的话,这里是整个国家

foreach ($custom_fields as $custom_field) {
                if (($custom_field['location'] == 'address') && $custom_field['required'] && empty($value['custom_field'][$custom_field['custom_field_id']])) {
                    $this->error['address'][$key]['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($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
                    $this->error['address'][$key]['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field_validate'), $custom_field['name']);
                }
            }
我对php知之甚少,但很想解决这个问题

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

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

您从未关闭过空的
<代码>!空($custom_field['validation']。这也是一段极难阅读的代码。如果您练习更好的格式,请稍微分解一下。