Skip to content

Commit

Permalink
Ensure that required data is defined before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Mar 26, 2024
1 parent d0a3d7d commit 8418bde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions search/includes/classes/class-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -1188,8 +1188,8 @@ public function ep_handle_failed_request( $request, $response, $query, $type, $c
return;
}

if ( ! $is_cli ) {
global $wp;
global $wp;
if ( ! $is_cli && isset( $wp->query_vars ) && isset( $_SERVER['REQUEST_URI'] ) ) {
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized,WordPress.Security.ValidatedSanitizedInput.InputNotValidated
$request_url_for_logging = esc_url_raw( add_query_arg( $wp->query_vars, home_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
}
Expand Down

0 comments on commit 8418bde

Please sign in to comment.