fix check!
This commit is contained in:
parent
fcc9603920
commit
1fd0cca185
1 changed files with 2 additions and 2 deletions
|
@ -52,7 +52,7 @@ class Http {
|
||||||
$response = \wp_safe_remote_post( $url, $args );
|
$response = \wp_safe_remote_post( $url, $args );
|
||||||
$code = \wp_remote_retrieve_response_code( $response );
|
$code = \wp_remote_retrieve_response_code( $response );
|
||||||
|
|
||||||
if ( 400 <= $code && 500 >= $code ) {
|
if ( $code <= 400 ) {
|
||||||
$response = new WP_Error( $code, __( 'Failed HTTP Request', 'activitypub' ) );
|
$response = new WP_Error( $code, __( 'Failed HTTP Request', 'activitypub' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class Http {
|
||||||
$response = \wp_safe_remote_get( $url, $args );
|
$response = \wp_safe_remote_get( $url, $args );
|
||||||
$code = \wp_remote_retrieve_response_code( $response );
|
$code = \wp_remote_retrieve_response_code( $response );
|
||||||
|
|
||||||
if ( 400 <= $code && 500 >= $code ) {
|
if ( $code <= 400 ) {
|
||||||
$response = new WP_Error( $code, __( 'Failed HTTP Request', 'activitypub' ) );
|
$response = new WP_Error( $code, __( 'Failed HTTP Request', 'activitypub' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue