[wp-trac] [WordPress Trac] #61680: is_utf8_charset() undefined when called by code in compat.php

WordPress Trac noreply at wordpress.org
Thu Jul 18 18:20:54 UTC 2024


#61680: is_utf8_charset() undefined when called by code in compat.php
-------------------------------------------+---------------------
 Reporter:  dmsnell                        |       Owner:  jorbin
     Type:  defect (bug)                   |      Status:  closed
 Priority:  high                           |   Milestone:  6.6.1
Component:  General                        |     Version:  6.6
 Severity:  normal                         |  Resolution:  fixed
 Keywords:  has-patch dev-reviewed commit  |     Focuses:
-------------------------------------------+---------------------
Changes (by jorbin):

 * owner:  (none) => jorbin
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"58764" 58764]:
 {{{
 #!CommitTicketReference repository="" revision="58764"
 General: Provide _is_utf8_charset() in compat.php for early use

 #61182 introduced is_utf8_charset() as a way of standardizing checks for
 charset slugs referring to UTF-8. This is called by _mb_strlen() inside of
 compat.php, but is_utf8_charset() is defined in functions.php, which isn't
 loaded early on. Code calling mb_strlen() early on before functions.php
 loads in hosts without the multibyte extension therefore may crash.

 Reviewed by hellofromTonya.
 Merges [58763] to the 6.6 branch.

 Props dmsnell, jonsurrell, joemcgill, jorbin.
 Fixes #61680.
 }}}

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


More information about the wp-trac mailing list