From 844e36b11eabcf9a6c01419b99c2d8cceede5543 Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Sun, 30 Jul 2023 15:08:51 +0100 Subject: [PATCH] Author archive: ensure queried object ID is an int Fixes #645. --- co-authors-plus.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/co-authors-plus.php b/co-authors-plus.php index cf650b8f..cb35de90 100755 --- a/co-authors-plus.php +++ b/co-authors-plus.php @@ -1221,7 +1221,7 @@ public function fix_author_page( $selection ) { if ( is_object( $authordata ) || ! empty( $term ) ) { $wp_query->queried_object = $authordata; - $wp_query->queried_object_id = $authordata->ID; + $wp_query->queried_object_id = (int) $authordata->ID; if ( ! is_paged() ) { add_filter( 'pre_handle_404', '__return_true' ); }