History filter with custom multiselect field

I set up a custom field defined as enum to emails and notes to fill in tags from a option list. It is working fine so far.
But searching the history filter does not work as
" $this->searchFields[category_tags_c] "in SearchForm2.php
[value] => Array
[0] => null
if i do not select at least one tag.
Which makes query to
“emails.category_tags_c like ‘%null%’”
as per log file.
I tried with wildcard value “%” for all but do not work neither as it results in
“emails.category_tags_c like ‘%%%’”
Thank you for help

My solution for the time being is not upgrade safe but works:


public function generateSearchWhere

Change from:
if ($val != ' ' and $val != '') {
to :
if ($val != ' ' and $val != '' && $val != 'null') {