Skip to content

Commit ee4170b

Browse files
committed
Typecast the input param to string for typesaftey and fix fatal
1 parent 0b50baa commit ee4170b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/wp-admin/includes/export.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ function export_wp( $args = array() ) {
243243
* @return string
244244
*/
245245
function wxr_cdata( $str ) {
246+
$str = (string) $str;
247+
246248
if ( ! wp_is_valid_utf8( $str ) ) {
247249
$str = utf8_encode( $str );
248250
}

0 commit comments

Comments
 (0)