From 95e3ed808a47e5c21cb4e6e76370d0eec7770695 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 9 Dec 2004 00:25:07 +0000 Subject: [PATCH] Don't show errors if we can't fsockopen a server. git-svn-id: https://develop.svn.wordpress.org/trunk@1926 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d144e3c0e6..74cef3506a 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -817,7 +817,7 @@ function do_enclose( $content, $post_ID ) { $headers = "HEAD $file HTTP/1.1\r\nHOST: $host\r\n\r\n"; $port = 80; $timeout = 3; - $fp = fsockopen($host, $port, $err_num, $err_msg, $timeout); + $fp = @fsockopen($host, $port, $err_num, $err_msg, $timeout); if( $fp ) { fputs($fp, $headers ); $response = ''; @@ -945,7 +945,7 @@ function discover_pingback_server_uri($url, $timeout_bytes = 2048) { $port = (isset($port)) ? $port : 80; // Try to connect to the server at $host - $fp = fsockopen($host, $port, $errno, $errstr, 3); + $fp = @fsockopen($host, $port, $errno, $errstr, 2); if (!$fp) { // Couldn't open a connection to $host; return false;