[wp-trac] [WordPress Trac] #64347: Fatal error when `wxr_cdata()` is called with non-string value

WordPress Trac noreply at wordpress.org
Tue Jan 27 22:12:56 UTC 2026


#64347: Fatal error when `wxr_cdata()` is called with non-string value
-------------------------------------------------+-------------------------
 Reporter:  desrosj                              |       Owner:
                                                 |  westonruter
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.9.1
Component:  Export                               |     Version:  6.9
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests fixed-      |     Focuses:
  major dev-reviewed                             |
-------------------------------------------------+-------------------------
Changes (by jorbin):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61540" 61540]:
 {{{
 #!CommitTicketReference repository="" revision="61540"
 Export: Fix fatal error when passing `null` to `wxr_cdata()` by casting
 passed value to `string`.

 This ensures that `wp_is_valid_utf8()` does not cause a type error since
 it only accepts strings.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10595

 Follow-up to [60630].

 Reviewed-by jorbin.
 Merges [61405] to the 6.9 branch.

 Props hbhalodia, westonruter, desrosj, albigdd, jorbin.
 See #38044.
 Fixes #64347.
 }}}

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


More information about the wp-trac mailing list