[wp-trac] [WordPress Trac] #58206: Replace usage of strpos with str_contains

WordPress Trac noreply at wordpress.org
Fri Jun 23 15:43:47 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:"56002" 56002]:
 {{{
 #!CommitTicketReference repository="" revision="56002"
 Script Loader: Replace `str_contains()` usage in `wp-includes/script-
 loader.php`.

 This avoids fatal errors on PHP < 8.0 if the file is included via `wp-
 admin/load-scripts.php` or `wp-admin/load-styles.php`, in which case the
 polyfills from `wp-includes/compat.php` are not loaded.

 Follow-up to [55703], [55710], [55988].

 Props ryelle.
 See #58206.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58206#comment:36>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list