We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4907e58 commit fc16a6aCopy full SHA for fc16a6a
src/WP_CLI/CommandWithUpgrade.php
@@ -826,9 +826,10 @@ public function get_the_latest_github_version( $repo_slug ) {
826
$body = \wp_remote_retrieve_body( $response );
827
$decoded_body = json_decode( $body );
828
829
- if ( wp_remote_retrieve_response_code( $response ) === \WP_Http::FORBIDDEN ) {
+ // WP_Http::FORBIDDEN doesn't exist in WordPress 3.7
830
+ if ( 403 === wp_remote_retrieve_response_code( $response ) ) {
831
return new \WP_Error(
- \WP_Http::FORBIDDEN,
832
+ 403,
833
$this->build_rate_limiting_error_message( $decoded_body )
834
);
835
}
0 commit comments