Skip to content

Commit bf27598

Browse files
authored
Merge branch 'WordPress:trunk' into trunk
2 parents ee4c363 + 8b0573e commit bf27598

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/phpunit/tests/rest-api/rest-block-directory-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ private function prevent_requests_to_host( $blocked_host = 'api.wordpress.org' )
273273
add_filter(
274274
'pre_http_request',
275275
static function ( $response, $parsed_args, $url ) use ( $blocked_host ) {
276-
if ( @parse_url( $url, PHP_URL_HOST ) === $blocked_host ) {
276+
if ( wp_parse_url( $url, PHP_URL_HOST ) === $blocked_host ) {
277277
return new WP_Error( 'plugins_api_failed', "An expected error occurred connecting to $blocked_host because of a unit test", "cURL error 7: Failed to connect to $blocked_host port 80: Connection refused" );
278278

279279
}

tests/phpunit/tests/rest-api/rest-plugins-controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ private function prevent_requests_to_host( $blocked_host = 'api.wordpress.org' )
11671167
add_filter(
11681168
'pre_http_request',
11691169
static function ( $response, $parsed_args, $url ) use ( $blocked_host ) {
1170-
if ( @parse_url( $url, PHP_URL_HOST ) === $blocked_host ) {
1170+
if ( wp_parse_url( $url, PHP_URL_HOST ) === $blocked_host ) {
11711171
return new WP_Error( 'plugins_api_failed', "An expected error occurred connecting to $blocked_host because of a unit test", "cURL error 7: Failed to connect to $blocked_host port 80: Connection refused" );
11721172

11731173
}

0 commit comments

Comments
 (0)