[wp-trac] [WordPress Trac] #61681: PHP Fatal error: Uncaught Error: Object of class WP_Comment could not be converted to string

WordPress Trac noreply at wordpress.org
Thu Jul 18 18:02:33 UTC 2024


#61681: PHP Fatal error:  Uncaught Error: Object of class WP_Comment could not be
converted to string
-------------------------------------------------+-------------------------
 Reporter:  ambrosiawt                           |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  closed
 Priority:  high                                 |   Milestone:  6.6.1
Component:  Comments                             |     Version:  6.6
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  dev-reviewed                                   |
-------------------------------------------------+-------------------------

Comment (by jorbin):

 In [changeset:"58763" 58763]:
 {{{
 #!CommitTicketReference repository="" revision="58763"
 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.

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

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


More information about the wp-trac mailing list