From a241165461026f5e99a0e77b2c6fa7ce13415a11 Mon Sep 17 00:00:00 2001 From: dkmyta Date: Tue, 30 Jul 2024 13:39:38 -0700 Subject: [PATCH] Fix global_stats type check --- projects/packages/waf/src/class-waf-stats.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/packages/waf/src/class-waf-stats.php b/projects/packages/waf/src/class-waf-stats.php index 6303f05c126ed..625192d5b934a 100644 --- a/projects/packages/waf/src/class-waf-stats.php +++ b/projects/packages/waf/src/class-waf-stats.php @@ -150,10 +150,10 @@ public static function get_global_stats( $refresh_from_wpcom = false ) { $global_stats = self::get_global_stats_from_options(); } - // Ensure that $global_stats is the correct type - if ( ! is_array( $global_stats ) && ! ( $global_stats instanceof \WP_Error ) ) { - return new \WP_Error( 'unexpected_type', 'Unexpected type or null returned for global stats' ); - } + // // Ensure that $global_stats is of the correct type + // if ( ( ! is_array( $global_stats ) && ! ( $global_stats instanceof \WP_Error ) ) ) { + // return new \WP_Error( 'unexpected_type', 'Unexpected type or null returned for global stats' ); + // } return $global_stats; }