From 3302eb70fa1fb88e6de8694ec2f3a21382af7170 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 4 Oct 2006 03:05:46 +0000 Subject: [PATCH] Silence gethostbyaddr(). Props MarkJaquith. fixes #2759 git-svn-id: http://svn.automattic.com/wordpress/branches/2.0@4287 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/pluggable-functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index f9fe9fa649..77011a2320 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -337,7 +337,7 @@ function wp_notify_postauthor($comment_id, $comment_type='') { if ('' == $user->user_email) return false; // If there's no email to send the comment to - $comment_author_domain = gethostbyaddr($comment->comment_author_IP); + $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); $blogname = get_settings('blogname'); @@ -414,7 +414,7 @@ function wp_notify_moderator($comment_id) { $comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1"); $post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1"); - $comment_author_domain = gethostbyaddr($comment->comment_author_IP); + $comment_author_domain = @gethostbyaddr($comment->comment_author_IP); $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'"); $notify_message = sprintf( __('A new comment on the post #%1$s "%2$s" is waiting for your approval'), $post->ID, $post->post_title ) . "\r\n";