diff --git a/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php b/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php index 97d4e64a9..b65a8563e 100644 --- a/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php +++ b/public_html/wp-content/plugins/camptix/inc/class-camptix-admin.php @@ -202,8 +202,11 @@ public function menu_tools_tabs() { * @see summarize_admin_init() */ public function menu_tools_summarize() { - $summarize_by = isset( $_POST['tix_summarize_by'] ) ? $_POST['tix_summarize_by'] : 'ticket'; - if ( isset( $_POST['tix_summarize_submit'] ) && wp_verify_nonce( $_POST['_wp_nonce'], 'tix_summarize' ) && array_key_exists( $summarize_by, $this->get_available_summary_fields() ) ) : + if ( isset( $_POST['tix_summarize_submit'] ) && wp_verify_nonce( $_POST['_wp_nonce'], 'tix_summarize' ) ) { + $summarize_by = isset( $_POST['tix_summarize_by'] ) ? $_POST['tix_summarize_by'] : 'ticket'; + if ( ! array_key_exists( $summarize_by, $this->get_available_summary_fields() ) ) { + return; + } $fields = $this->get_available_summary_fields(); $summary = $this->get_summary( $summarize_by ); $summary_title = $fields[ $summarize_by ];