- Issue created by @Igumnov_aleksey
- last update
over 1 year ago 25 pass - 🇮🇳India keshavv India
We need to use
!empty()
as the$value
variable already exists. - last update
over 1 year ago 25 pass Hi keshav.k
I applied the patch from comment #4 and its triggered an error when I tried to perform a search
Search is temporarily unavailable. If the problem persists, please contact the site administrator.
Rootcause.
Variable "$value" can be 0 then:return trim($value) ; // returns string(1) "0" return !empty($value) ? trim($value) : ''; // returns string(0) ""
As we can see there difference between returned values. This difference lead to wrong work of search.
To fix this issue I propose replace !empty() by isset():return isset($value) ? trim($value) : '';
The patch from comment #2 is correct.
- Status changed to RTBC
about 1 year ago 8:54pm 18 December 2023 - 🇳🇿New Zealand RoSk0 Wellington