Skip to content

Commit

Permalink
Merge branch 'develop' into release/4.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia authored Jul 5, 2023
2 parents 6fc3659 + a5f8ec3 commit dc3fb86
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion includes/classes/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,7 @@ protected function print_json_response( $response, $pretty ) {
* @param boolean $pretty_print_flag Whether it should or not be formatted.
*/
protected function pretty_json_encode( $json_obj, $pretty_print_flag ) {
$flag = $pretty_print_flag ? JSON_PRETTY_PRINT : null;
$flag = $pretty_print_flag ? JSON_PRETTY_PRINT : 0;
WP_CLI::line( wp_json_encode( $json_obj, $flag ) );
}

Expand Down
9 changes: 9 additions & 0 deletions includes/classes/StatusReport/FailedQueries.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,15 @@ protected function maybe_clear_logs() {
}

$this->query_logger->clear_logs();

if ( defined( 'EP_IS_NETWORK' ) && EP_IS_NETWORK ) {
$redirect_url = network_admin_url( 'admin.php?page=elasticpress-status-report' );
} else {
$redirect_url = admin_url( 'admin.php?page=elasticpress-status-report' );
}

wp_safe_redirect( $redirect_url );
exit();
}

/**
Expand Down

0 comments on commit dc3fb86

Please sign in to comment.