[wp-trac] [WordPress Trac] #58206: Replace usage of strpos with str_contains
WordPress Trac
noreply at wordpress.org
Fri Jun 23 12:15:22 UTC 2023
#58206: Replace usage of strpos with str_contains
-------------------------------------+-------------------------------------
Reporter: spacedmonkey | Owner: SergeyBiryukov
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has- | Focuses: performance, coding-
patch 2nd-opinion commit | standards
-------------------------------------+-------------------------------------
Comment (by SergeyBiryukov):
In [changeset:"55994" 55994]:
{{{
#!CommitTicketReference repository="" revision="55994"
Database: Replace `str_contains()` and `str_ends_with()` usage in `wpdb`
methods.
This avoids fatal errors on PHP < 8.0 if the file is included directly
outside of WordPress core, e.g. by HyperDB.
While WordPress core does include polyfills for these functions, they are
not directly loaded in the `wpdb` class.
Follow-up to [54384], [55157], [55158], [55988], [55990].
Props dd32, ryelle, joedolson.
See #58206.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58206#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list