Address-book ошибка

Тема в разделе "Ошибки и их решения", создана пользователем shuterr, 6 апр 2016.

  1. shuterr

    shuterr Новичок

    Сообщения:
    20
    Симпатии:
    1
    Привет всем. Подсобите пожалуйста, никак не пойму.

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

    PHP:
            } 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'])))) {
     
  2. shuterr

    shuterr Новичок

    Сообщения:
    20
    Симпатии:
    1
    Вообщем через разные манипуляции нашел ответ, думаю многим пригодится, кто встал на версию 2.2

    Вот это:
    PHP:
      } 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'])))) {
    Меняем на:
    PHP:
    } 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'])))) {
     
    Марина Василиса нравится это.