PHP Error: Invalid EE Conditional Variable
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
Low 24 Apr 2016 08:07
EE2.8 and below don't support those conditionals. As the top of the example page states:
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...
Trent 24 Apr 2016 08:12
Perfect, thank you Lodewijk.
That did the trick, apologies for not seeing that one.
=)