diff --git a/src/wp-admin/includes/export.php b/src/wp-admin/includes/export.php index 9d5903a98c5c3..031d4123025fa 100644 --- a/src/wp-admin/includes/export.php +++ b/src/wp-admin/includes/export.php @@ -243,6 +243,10 @@ function export_wp( $args = array() ) { * @return string */ function wxr_cdata( $str ) { + if ( ! is_string( $str ) ) { + return ''; + } + if ( ! wp_is_valid_utf8( $str ) ) { $str = utf8_encode( $str ); }