← All changes
|
src/services/content-api/endpoints/class-endpoint-validate.php
+5
-1
3.23.7
→
3.24.3
View file →
| @@ -71,11 +71,15 @@ | ||
| 71 | 71 | return $response; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | if ( false === $response['success'] ) { |
| 75 | + // Built from a successful response, so request() didn't strip it. | |
| 75 | 76 | return new WP_Error( |
| 76 | 77 | $response['code'] ?? 403, |
| 77 | - $response['message'] ?? __( 'Unable to validate the API credentials', 'wp-parsely' ) | |
| 78 | + $this->strip_credentials( | |
| 79 | + (string) ( $response['message'] ?? | |
| 80 | + __( 'Unable to validate the API credentials', 'wp-parsely' ) ) | |
| 81 | + ) | |
| 78 | 82 | ); |
| 79 | 83 | } |
| 80 | 84 | |
| 81 | 85 | return $response; |