[11.x] Handle Null Check in Str::startsWith and Str::endsWith#54520
Conversation
|
Wouldn't it be better to either throw an exception or target |
The PHPDoc didn't come from me. I forgot to turn off auto-formatting in my IDE, so those changes are me reverting what my IDE did automatically. I think early returning |
|
For consistency, this handling of null haystack should be made to Note: when using the "ignoreCase" mode, make sure that |
This PR adds a null check to the
$haystackparameter. Null values for this parameter have been deprecated, causing error messages to be logged. If$haystackisnull, thenStr::startsWithandStr::endsWithwill return false.