File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -544,9 +544,6 @@ protected function renderFilterExpression(Filter $filter)
544544 $ sign = $ filter ->getSign ();
545545 $ value = $ filter ->getExpression ();
546546
547- $ matchWildcard = $ sign === '= ' && ! $ filter instanceof FilterEqual
548- || $ sign === '!= ' && ! $ filter instanceof FilterNotEqual;
549-
550547 if (is_array ($ value )) {
551548 $ comp = [];
552549 $ pattern = [];
@@ -582,13 +579,21 @@ protected function renderFilterExpression(Filter $filter)
582579 }
583580
584581 return count ($ sql ) === 1 ? $ sql [0 ] : '( ' . implode (" $ operator " , $ sql ) . ') ' ;
585- } elseif ($ matchWildcard && $ value !== null && strpos ($ value , '* ' ) !== false ) {
582+ } elseif ($ sign === '= '
583+ && ! $ filter instanceof FilterEqual
584+ && $ value !== null
585+ && strpos ($ value , '* ' ) !== false
586+ ) {
586587 if ($ value === '* ' ) {
587588 return $ column . ' IS NOT NULL ' ;
588589 }
589590
590591 return $ column . ' LIKE ' . $ this ->dbAdapter ->quote (preg_replace ('~\*~ ' , '% ' , $ value ));
591- } elseif ($ matchWildcard && $ value !== null && strpos ($ value , '* ' ) !== false ) {
592+ } elseif ($ sign === '!= '
593+ && ! $ filter instanceof FilterNotEqual
594+ && $ value !== null
595+ && strpos ($ value , '* ' ) !== false
596+ ) {
592597 if ($ value === '* ' ) {
593598 return $ column . ' IS NULL ' ;
594599 }
You can’t perform that action at this time.
0 commit comments