v.23.8Improvement
Make hasTokenOrNull and hasTokenCaseInsensitiveOrNull Return Null for Empty Needles
MakehasTokenOrNullandhasTokenCaseInsensitiveOrNullreturn null for empty needles. #53059 (ltrk2).
Why it matters
This change resolves ambiguous behavior when these functions receive an empty needle by explicitly returningnull. It improves data correctness and consistency by clearly indicating that a search with an empty token is undefined rather than returning a misleading true or false.How to use it
Use thehasTokenOrNull and hasTokenCaseInsensitiveOrNull functions as before. When the needle argument is empty, these functions will now return null instead of false or true.