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