diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index fb0d67d705..b0a421586c 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/wp-admin/includes/class-wp-media-list-table.php @@ -503,15 +503,22 @@ class WP_Media_List_Table extends WP_List_Table { * Handles the author column output. * * @since 4.3.0 + * @since 6.8.0 Added fallback text when author's name is unknown. * * @param WP_Post $post The current WP_Post object. */ public function column_author( $post ) { - printf( - '%s', - esc_url( add_query_arg( array( 'author' => get_the_author_meta( 'ID' ) ), 'upload.php' ) ), - get_the_author() - ); + $author = get_the_author(); + + if ( ! empty( $author ) ) { + printf( + '%s', + esc_url( add_query_arg( array( 'author' => get_the_author_meta( 'ID' ) ), 'upload.php' ) ), + esc_html( $author ) + ); + } else { + echo '' . __( '(no author)' ) . ''; + } } /** diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index aff267b97c..3d25b2f7ff 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -1277,15 +1277,22 @@ class WP_Posts_List_Table extends WP_List_Table { * Handles the post author column output. * * @since 4.3.0 + * @since 6.8.0 Added fallback text when author's name is unknown. * * @param WP_Post $post The current WP_Post object. */ public function column_author( $post ) { - $args = array( - 'post_type' => $post->post_type, - 'author' => get_the_author_meta( 'ID' ), - ); - echo $this->get_edit_link( $args, get_the_author() ); + $author = get_the_author(); + + if ( ! empty( $author ) ) { + $args = array( + 'post_type' => $post->post_type, + 'author' => get_the_author_meta( 'ID' ), + ); + echo $this->get_edit_link( $args, esc_html( $author ) ); + } else { + echo '' . __( '(no author)' ) . ''; + } } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 6c402b5723..01573f078a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-beta2-60031'; +$wp_version = '6.8-beta2-60032'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.