diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index 3d82ba81b641b..423d34dae0082 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -411,7 +411,7 @@ function the_excerpt() { * @return string Post excerpt. */ function get_the_excerpt( $post = null ) { - if ( is_bool( $post ) ) { + if ( ! is_null( $post ) && ! is_numeric( $post ) && ! ( $post instanceof WP_Post ) ) { _deprecated_argument( __FUNCTION__, '2.3.0' ); }