[wp-trac] [WordPress Trac] #58206: Replace usage of strpos with str_contains
WordPress Trac
noreply at wordpress.org
Mon Jun 26 18:04:50 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
-------------------------------------+-------------------------------------
Changes (by westonruter):
* status: closed => reopened
* resolution: fixed =>
Comment:
When running the wordpress-develop core development site in 7.4 I found a
fatal error due to the changes here, specifically r56031. I get:
{{{
Fatal error: Uncaught Error: Call to undefined function str_ends_with()
in /var/www/src/wp-includes/load.php:76
Stack trace:
#0 /var/www/src/index.php(27): wp_fix_server_vars()
#1 {main}
thrown in /var/www/src/wp-includes/load.php on line 76
}}}
To use this function here, it seems we'll need to load `compat.php`
earlier.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58206#comment:44>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list