[wp-trac] [WordPress Trac] #34631: Extra compat for mbstring: mb_strpos()

WordPress Trac noreply at wordpress.org
Thu Jul 25 17:19:45 UTC 2024


#34631: Extra compat for mbstring: mb_strpos()
-------------------------------------------------+-------------------------
 Reporter:  Cybr                                 |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Charset                              |     Version:  4.4
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing close 2nd-   |     Focuses:
  opinion                                        |
-------------------------------------------------+-------------------------
Changes (by desrosj):

 * keywords:  has-patch needs-testing => has-patch needs-testing close 2nd-
     opinion
 * milestone:   => Awaiting Review


Comment:

 Hi @Cybr,

 My apologies that this ticket took so long to receive a response.

 It looks like `mb_strpos()` is still not included in the `compat.php`
 file, so this is still a relevant report. However, I looked into some
 stats related to PHP extensions for WordPress sites and it seems that
 99.41% of all sites have `mbstring` enabled. It's also documented as
 ''highly recommended'' in the [https://make.wordpress.org/hosting/handbook
 /server-environment/#php-extensions Make Hosting team's Handbook].

 All that said, I'm not sure this compatibility shim benefits the majority
 of sites. When originally opened, I'm sure that the percentage of sites
 missing `mbstring` was a lot higher. Using `function_exists()` checks
 could at least guard against fatal errors on the rare occasion that it's
 missing today.

 I'm going to suggest this be closed as a `wontfix`, but leaving it open
 for other contributors to weigh in.

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


More information about the wp-trac mailing list