diff --git a/wp-includes/class-http.php b/wp-includes/class-http.php index 91d06c49ff..50e18f99d6 100644 --- a/wp-includes/class-http.php +++ b/wp-includes/class-http.php @@ -121,7 +121,8 @@ class WP_Http { if ( $r['reject_unsafe_urls'] ) $url = wp_http_validate_url( $url ); - $url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) ); + if ( function_exists( 'wp_kses_bad_protocol' ) ) + $url = wp_kses_bad_protocol( $url, array( 'http', 'https', 'ssl' ) ); $arrURL = @parse_url( $url );