Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation syntax error, unexpected T_BOOLEAN_OR

    i have a error T_BOOLEAN_OR on my php
    how to fix it
    PHP Code:


    if (!preg_match($nomor,$this->request->post['order_id'])) || ((strlen(utf8_decode($this->request->post['order_id'])) < 3) || (strlen(utf8_decode($this->request->post['order_id'])) > 100)) {
                
    $this->error['order_id'] = $this->language->get('error_order_id');
            } 

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,606
    Thanks
    6
    Thanked 997 Times in 970 Posts
    Check the brackets. The if bracket is erroneously closed after the first query already:
    Code:
    if (!preg_match($nomor,$this->request->post['order_id'])) || ((strlen(utf8_decode($this->request->post['order_id'])) < 3) || (strlen(utf8_decode($this->request->post['order_id'])) > 100))
    Everything coming after that is wrong then. Correctly it needs to look like this:
    Code:
    if (!preg_match($nomor,$this->request->post['order_id']) || strlen(utf8_decode($this->request->post['order_id'])) < 3 || strlen(utf8_decode($this->request->post['order_id'])) > 100)
    (I assume the three conditions are on the same level and not nested?)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •