Skip to content

Commit ecc59af

Browse files
committed
Fix scenarios where WP_Error::get_error_code() return string
1 parent c6790ce commit ecc59af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/lib/Aplazame/Aplazame/Http/WpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function send( Aplazame_Sdk_Http_RequestInterface $request ) {
1616

1717
$wpResponse = wp_remote_request( $request->getUri(), $args );
1818
if ( is_wp_error( $wpResponse ) ) {
19-
throw new RuntimeException( $wpResponse->get_error_message(), $wpResponse->get_error_code() );
19+
throw new RuntimeException( $wpResponse->get_error_message(), (int) $wpResponse->get_error_code() );
2020
}
2121

2222
$responseBody = wp_remote_retrieve_body( $wpResponse );

0 commit comments

Comments
 (0)