Skip to content

Commit

Permalink
Release 3.17.3.1 (PR #7137)
Browse files Browse the repository at this point in the history
  • Loading branch information
wordpressfan authored Nov 25, 2024
2 parents 4542d7b + df52190 commit d63767c
Show file tree
Hide file tree
Showing 8 changed files with 1,525 additions and 8 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@
"@test-integration-pressidium"
],
"run-stan": "vendor/bin/phpstan analyze --memory-limit=2G --no-progress",
"run-stan-reset-baseline": "vendor/bin/phpstan analyze --memory-limit=2G --no-progress --generate-baseline",
"install-codestandards": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run",
"phpcs": "phpcs --basepath=.",
"phpcs-changed": "./bin/phpcs-changed.sh",
Expand Down
2 changes: 1 addition & 1 deletion dynamic-lists-delayjs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dynamic-lists.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private function send_request( $method, $params = [], $safe = false ) {

$transient_key = $this->get_transient_key();
if ( get_transient( $transient_key . '_timeout_active' ) ) {
return new WP_Error( 429, __( 'Too many requests.', 'rocket' ) );
return new WP_Error( 429, 'Too many requests.' );
}
// Get previous_expiration early to avoid multiple parallel requests increasing the expiration multiple times.
$previous_expiration = (int) get_transient( $transient_key . '_timeout' );
Expand All @@ -82,7 +82,7 @@ private function send_request( $method, $params = [], $safe = false ) {
$body = wp_remote_retrieve_body( $response );
if ( empty( $body ) || ( ! empty( $response['response']['code'] ) && 200 !== $response['response']['code'] ) ) {
$this->set_timeout_transients( $previous_expiration );
return new WP_Error( 500, __( 'Not valid response.', 'rocket' ) );
return new WP_Error( 500, 'Not valid response.' );
}

$this->delete_timeout_transients();
Expand Down Expand Up @@ -148,6 +148,6 @@ private function send_remote_request( $api_url, $method, $params, $safe ) {
return wp_safe_remote_post( $api_url, $params );
}

return new WP_Error( 400, __( 'Not valid request type.', 'rocket' ) );
return new WP_Error( 400, 'Not valid request type.' );
}
}
Loading

0 comments on commit d63767c

Please sign in to comment.