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

WordPress Trac noreply at wordpress.org
Wed Dec 3 22:55:52 UTC 2025


#64347: Fatal error when `wxr_cdata()` is called with non-string value
--------------------------+---------------------
 Reporter:  desrosj       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.9.1
Component:  Export        |     Version:  6.9
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by desrosj):

 Looking through `wp-admin/includes/export.php`, it seems that there are a
 few possible culprits.

 If a plugin or theme is using a filter
 (`the_title_export`/`the_content_export`/`the_excerpt_export`) to return a
 value a non-string value such as `NULL` or an integer, there is no
 protection in place for this and a fatal error will occur due to the
 `string` type safety defined for `wp_is_valid_utf8()`. Though that seems
 to be a scenario that could come up, I don't think that's the root cause
 in this case because the user is still seeing the issue after disabling
 all plugins.

 The other possibility is that a plugin or some custom code has explicitly
 set a meta value to a non-string value. Because `export_wp()` performs
 direct database queries to retrieve post/term/comment metadata, there's no
 guarantee that non-string values will be converted to strings as expected.

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


More information about the wp-trac mailing list