From e3bdc53bea8fdc1ca8755691b293710d41ebe656 Mon Sep 17 00:00:00 2001 From: Cobianzo Date: Wed, 2 Aug 2023 20:02:57 +0100 Subject: [PATCH] 975-verification with isset before using properties --- template-tags.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template-tags.php b/template-tags.php index ab28b707..a3f9d6a0 100644 --- a/template-tags.php +++ b/template-tags.php @@ -73,7 +73,8 @@ function is_coauthor_for_post( $user, $post_id = 0 ) { } foreach ( $coauthors as $coauthor ) { - if ( $user == $coauthor->user_login || $user == $coauthor->linked_account ) { + if ( ( isset( $coauthor->user_login ) && $user == $coauthor->user_login ) + || ( isset( $coauthor->linked_account ) && $user == $coauthor->linked_account ) ) { return true; } }