Index: wp-includes/post-template.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- wp-includes/post-template.php	(revision 3b3ded01a0d13116c8a35094c37e420642545143)
+++ wp-includes/post-template.php	(revision )
@@ -360,9 +360,10 @@
  * @since 4.5.0 Introduced the `$post` parameter.
  *
  * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global $post.
+ * @param bool $private Optional. Return post excerpt for private post. Default is true.
  * @return string Post excerpt.
  */
-function get_the_excerpt( $post = null ) {
+function get_the_excerpt( $post = null, $private = true ) {
 	if ( is_bool( $post ) ) {
 		_deprecated_argument( __FUNCTION__, '2.3' );
 	}
@@ -372,7 +373,7 @@
 		return '';
 	}
 
-	if ( post_password_required() ) {
+	if ( $private && post_password_required() ) {
 		return __( 'There is no excerpt because this is a protected post.' );
 	}
 
@@ -397,8 +398,7 @@
  * @return bool
  */
 function has_excerpt( $id = 0 ) {
-	$post = get_post( $id );
-	return ( !empty( $post->post_excerpt ) );
+	return (bool) get_the_excerpt($id, false);
 }
 
 /**
