- Issue created by @Manikandan Era
- 🇮🇳India sidharth_soman Bangalore
I might be mistaken, but wouldn't it be more concise if we used the null coalescing operator within mb_strtolower to avoid the passing of null as an argument?
Perhaps something like this:
$originalKeys = $query->getOriginalKeys(); $lowerOriginalKeys = mb_strtolower($originalKeys ?? ''); //Here, $lowerOriginalKeys should be an empty string if $originalKeys was null. $keywords = trim($lowerOriginalKeys); //still an empty string if (!empty($keywords)) { //if $keywords is an empty string, it will not hit this conditional and thus not add the fields.
- First commit to issue fork.
- @sakthi_dev opened merge request.
- Status changed to Needs review
over 1 year ago 1:41pm 25 July 2023 - 🇮🇳India sakthi_dev
Created a MR with null coalescing operator as there is a if clause to verify $keywords. Not sure why we are getting NULL value while trying to retrieve originalKeys. MR might be a temporary solution but it would be better to have the condition for future and also root cause for getting NULL for originalKeys.
- Status changed to Fixed
7 months ago 8:21am 30 April 2024 - 🇨🇦Canada mandclu
There's a chance this will have been resolved by the check added in 🐛 Empty search returns error Fixed but adding the empty string as a fallback still seems sensible. Merged in, and thanks for everyone's work here.
Automatically closed - issue fixed for 2 weeks with no activity.