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

WordPress Trac noreply at wordpress.org
Fri Jun 23 01:57:55 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 dd32):

 Similar to [55157], [55990] (#58220) + [55988] have again introduced an
 external dependencies to `wpdb` of `compat.php` or PHP8.

 As mentioned above, [55988] has introduced the same thing as [55710] to
 `load-styles.php` - probably this change:
 https://core.trac.wordpress.org/changeset/55988/trunk/src/wp-includes
 /script-loader.php

 I think it might just be worthwhile including `compat.php` in all of these
 alternate entry points and requiring that `wpdb` when used outside of
 WordPress either loads compat too or runs on PHP8+.

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


More information about the wp-trac mailing list