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

WordPress Trac noreply at wordpress.org
Thu Jan 11 05:28:41 UTC 2024


#58206: Replace usage of strpos with str_contains
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.3
Component:  General                              |     Version:
 Severity:  blocker                              |  Resolution:  fixed
 Keywords:  good-first-bug 2nd-opinion add-to-   |     Focuses:  coding-
  field-guide has-patch                          |  standards
-------------------------------------------------+-------------------------

Comment (by poena):

 Do I understand correctly that the polyfill is only added to WordPress 5.9
 and later?

 The use of str_contains() in Twenty Twenty causes fatal errors because the
 theme supports WordPress version 4.7 and PHP 5.2.4.

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


More information about the wp-trac mailing list