diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php index f59f877775b77..344f286447c22 100644 --- a/src/wp-includes/formatting.php +++ b/src/wp-includes/formatting.php @@ -4737,6 +4737,7 @@ function esc_attr( $text ) { * @return string Escaped text. */ function esc_textarea( $text ) { + $text = (string) $text; $safe_text = htmlspecialchars( $text, ENT_QUOTES, get_option( 'blog_charset' ) ); /** * Filters a string cleaned and escaped for output in a textarea element.