diff --git a/src/wp-includes/class-wp-xmlrpc-server.php b/src/wp-includes/class-wp-xmlrpc-server.php index 8660bfdc5a..c331591dcf 100644 --- a/src/wp-includes/class-wp-xmlrpc-server.php +++ b/src/wp-includes/class-wp-xmlrpc-server.php @@ -6277,35 +6277,37 @@ class wp_xmlrpc_server extends IXR_Server { 'X-Pingback-Forwarded-For' => $remote_ip, ), ); - $request = wp_safe_remote_get( $pagelinkedfrom, $http_api_args ); - $linea = wp_remote_retrieve_body( $request ); - if ( !$linea ) + $request = wp_safe_remote_get( $pagelinkedfrom, $http_api_args ); + $remote_source = $remote_source_original = wp_remote_retrieve_body( $request ); + + if ( ! $remote_source ) { return $this->pingback_error( 16, __( 'The source URL does not exist.' ) ); + } /** * Filter the pingback remote source. * * @since 2.5.0 * - * @param string $linea Response object for the page linked from. - * @param string $pagelinkedto URL of the page linked to. + * @param string $remote_source Response source for the page linked from. + * @param string $pagelinkedto URL of the page linked to. */ - $linea = apply_filters( 'pre_remote_source', $linea, $pagelinkedto ); + $remote_source = apply_filters( 'pre_remote_source', $remote_source, $pagelinkedto ); // Work around bug in strip_tags(): - $linea = str_replace(']*>/", "\n\n", $linea ); + $remote_source = str_replace( ']*>/", "\n\n", $remote_source ); - preg_match('|