PluginProbe
Parse.ly / 3.24.2
Parse.ly v3.24.2
3.24.3 3.24.2 3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 All 107 releases
← All changes | src/services/suggestions-api/endpoints/class-endpoint-check-auth.php +8 -1 3.24.1 → 3.24.2 View file →
@@ -52,8 +52,9 @@
52 52 /**
53 53 * Sends a request to the remote API.
54 54 *
55 55 * @since 3.19.0
56 + * @since 3.24.2 Strips the credentials from errors.
56 57 *
57 58 * @param string $method The HTTP method to use for the request.
58 59 * @param array<mixed> $query_args The query arguments to send to the remote API.
59 60 * @param array<mixed> $data The data to send in the request body.
@@ -70,9 +71,15 @@
70 71
71 72 /** @var WP_HTTP_Response|WP_Error $response */
72 73 $response = wp_safe_remote_request( $request_url, $request_options );
73 74
74 - return $this->process_response( $response );
75 + if ( is_wp_error( $response ) ) {
76 + return $this->get_relayable_transport_error( $response );
77 + }
78 +
79 + $result = $this->process_response( $response );
80 +
81 + return is_wp_error( $result ) ? $this->strip_credentials_from_error( $result ) : $result;
75 82 }
76 83
77 84 /**
78 85 * Processes the response from the remote API.