[wp-trac] [WordPress Trac] #58012: Replace usage of strpos with str_starts_with

WordPress Trac noreply at wordpress.org
Wed May 3 03:11:51 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 dd32):

 Replying to [comment:25 flixos90]:
 > it seems this commit broke my WP core dev environment 🤔
 > [...] It may have unexpectedly broken something?

 This is because `script-loader.php` is used by `wp-admin/load-styles.php`
 which doesn't load the compat functions.

 > ( ! ) Fatal error: Uncaught Error: Call to undefined function
 str_starts_with() in wp-admin/load-styles.php on line 77

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


More information about the wp-trac mailing list