All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

PHP Error: Invalid EE Conditional Variable

Trent 24 Apr 2016 07:48 problem, complete

I am using EE2.8.1 with Low Search 4.4.3

This is my first time playing with Low Search.
I am playing with the Categories example: http://gotolow.com/addons/low-search/...

I am getting the following PHP error which this code is the culprit.

{if low_search_category ~ '/\b'.category_id.'\b/'} checked{/if}

Full PHP error is:

A PHP Error was encountered
Severity: User Warning
Message: Invalid EE Conditional Variable: {if "9|11" ~ '/\b'.category_id.'\b/'}
Filename: libraries/Functions.php
Line Number: 2640

A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /Clients/Client Name/HTML/system/codeigniter/system/core/Exceptions.php:170)
Filename: core/Common.php
Line Number: 446

Replies

  1. Low 24 Apr 2016 08:07

    EE2.8 and below don't support those conditionals. As the top of the example page states:

    Note: these examples feature conditionals using the Matches Operator introduced in EE 2.9.0. If you’re using an older version of ExpressionEngine, you can use the IN conditionals instead.


    So try and use the IN syntax instead: http://gotolow.com/addons/low-search/...

    And here's a blog post about the change in conditionals: http://gotolow.com/blog/conditional-c...

  2. Trent 24 Apr 2016 08:12

    Perfect, thank you Lodewijk.
    That did the trick, apologies for not seeing that one.
    =)