From b22319a8d91522bcd2584fab09196922e51ce1ad Mon Sep 17 00:00:00 2001 From: Burhan Nasir Date: Tue, 8 Nov 2022 16:00:07 +0500 Subject: [PATCH] Fix: Undefined array key on taxonomy page --- includes/classes/Indexable/Post/SyncManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/classes/Indexable/Post/SyncManager.php b/includes/classes/Indexable/Post/SyncManager.php index b795adf6d2..78c82dd93f 100644 --- a/includes/classes/Indexable/Post/SyncManager.php +++ b/includes/classes/Indexable/Post/SyncManager.php @@ -762,7 +762,7 @@ protected function is_tax_max_count_bigger_than_items_per_cycle( \WP_Taxonomy $t ] ); - if ( ! is_array( $max_count ) || ! $max_count[0] instanceof \WP_Term || ! is_integer( $max_count[0]->count ) ) { + if ( ! is_array( $max_count ) || ! count( $max_count ) || ! $max_count[0] instanceof \WP_Term || ! is_integer( $max_count[0]->count ) ) { set_transient( $transient_name, 0, HOUR_IN_SECONDS ); return false; }