Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes spelling of Elasticsearch. #905

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inc/elasticsearch_packages/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function create_package_id( ?string $package_id, string $slug, string $file, boo

// Check domain.
if ( ! defined( 'ELASTICSEARCH_HOST' ) || ! ELASTICSEARCH_HOST ) {
return new WP_Error( 'elasticsearch_host_not_found', 'Could not find an AWS ElasticSearch Service Domain to associate the package with.' );
return new WP_Error( 'elasticsearch_host_not_found', 'Could not find an AWS Elasticsearch Service Domain to associate the package with.' );
}

// Get AES client.
Expand Down
4 changes: 2 additions & 2 deletions inc/healthcheck/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,12 @@ function run_cron_healthcheck() {
}

/**
* Run ElasticSearch health check.
* Run Elasticsearch health check.
*/
function run_elasticsearch_healthcheck() {
$host = Cloud\get_elasticsearch_url();

// If no host is set then ElasticSearch not in use.
// If no host is set then Elasticsearch not in use.
if ( empty( $host ) ) {
return true;
}
Expand Down
8 changes: 4 additions & 4 deletions inc/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function bootstrap() {
// Display environment details in admin sidebar.
Environment_Indicator\bootstrap();

// Sign ElasticSearch HTTP requests and log errors.
// Sign Elasticsearch HTTP requests and log errors.
add_action( 'http_api_debug', __NAMESPACE__ . '\\log_elasticsearch_request_errors', 10, 5 );
add_filter( 'http_request_args', __NAMESPACE__ . '\\on_http_request_args', 11, 2 );

Expand Down Expand Up @@ -363,7 +363,7 @@ function sign_psr7_request( RequestInterface $request ) : RequestInterface {
}

/**
* Log ElasticSearch request errors.
* Log Elasticsearch request errors.
*
* @param array|WP_Error $response Response data.
* @param string $context The http_api_debug action context.
Expand All @@ -388,10 +388,10 @@ function log_elasticsearch_request_errors( $response, string $context, string $c

if ( is_wp_error( $response ) ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
trigger_error( sprintf( 'Error in ElasticSearch request: %s (%s)', $response->get_error_message(), $response->get_error_code() ), E_USER_WARNING );
trigger_error( sprintf( 'Error in Elasticsearch request: %s (%s)', $response->get_error_message(), $response->get_error_code() ), E_USER_WARNING );
} elseif ( ! $is_valid_res ) {
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
trigger_error( sprintf( 'Error in ElasticSearch request: %s (%s)', wp_remote_retrieve_body( $response ), $request_response_code ), E_USER_WARNING );
trigger_error( sprintf( 'Error in Elasticsearch request: %s (%s)', wp_remote_retrieve_body( $response ), $request_response_code ), E_USER_WARNING );
}
}

Expand Down
Loading