[wp-trac] [WordPress Trac] #58012: Replace usage of strpos with str_starts_with
WordPress Trac
noreply at wordpress.org
Wed May 3 15:47:54 UTC 2023
#58012: Replace usage of strpos with str_starts_with
-------------------------------------------------+-------------------------
Reporter: spacedmonkey | Owner:
| SergeyBiryukov
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.3
Component: General | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch 2nd- | Focuses:
opinion | performance
-------------------------------------------------+-------------------------
Comment (by SergeyBiryukov):
Replying to [comment:30 spacedmonkey]:
> script-loader.php Seems to have used since [55658]. Before this commit.
This file needs those compatibility functions.
Indeed, `str_starts_with()` was already used in a few places in `wp-
includes/script-loader.php`, see [52695], [52754], [53282], [55658].
In this case, however, it appears that the issue is not in that file but
in `wp-admin/load-styles.php` itself. It already loads a few theme files
as of [51056] and [52054], so maybe it should load `compat.php` as well?
In the meantime, [55710] should resolve the fatal error.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58012#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list