From 3585c1ad9bf54aa1e4d699314a25ac22858ae426 Mon Sep 17 00:00:00 2001 From: William Patton Date: Tue, 26 Nov 2024 17:31:12 +0000 Subject: [PATCH] Remove a duplicated siteid reference in query When this is here it always results in a falsey value which loosely casts to 0 making this only able to retrieve warning counts of site 0 --- includes/classes/class-summary-generator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/classes/class-summary-generator.php b/includes/classes/class-summary-generator.php index de4f5213..2833c9f0 100644 --- a/includes/classes/class-summary-generator.php +++ b/includes/classes/class-summary-generator.php @@ -165,7 +165,7 @@ private function count_warnings() { global $wpdb; $warnings_parameters = [ get_current_blog_id(), $this->post_id, 'warning', 0 ]; - $warnings_where = 'WHERE siteid = siteid = %d and postid = %d and ruletype = %s and ignre = %d'; + $warnings_where = 'WHERE siteid = %d and postid = %d and ruletype = %s and ignre = %d'; if ( EDAC_ANWW_ACTIVE ) { array_push( $warnings_parameters, 'link_blank' ); $warnings_where .= ' and rule != %s';