diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 4f2bbc2a8c..a2cd12f935 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -3728,7 +3728,7 @@ function wp_trim_excerpt( $text = '', $post = null ) { * * @param int $number The maximum number of words. Default 55. */ - $excerpt_length = apply_filters( 'excerpt_length', $excerpt_length ); + $excerpt_length = (int) apply_filters( 'excerpt_length', $excerpt_length ); /** * Filters the string in the "more" link displayed after a trimmed excerpt. @@ -3773,6 +3773,7 @@ function wp_trim_words( $text, $num_words = 55, $more = null ) { $original_text = $text; $text = wp_strip_all_tags( $text ); + $num_words = (int) $num_words; /* * translators: If your word count is based on single characters (e.g. East Asian characters), diff --git a/wp-includes/version.php b/wp-includes/version.php index 4ed3866e88..3eefdc0bcb 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.3-alpha-45795'; +$wp_version = '5.3-alpha-45796'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.