From d1926da5bb73191019c44d963da9f5228aaeec16 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Thu, 4 Dec 2008 20:26:05 +0000 Subject: [PATCH] Fix Notice on comment posting. git-svn-id: https://develop.svn.wordpress.org/trunk@10042 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 561da2402c..90b8a7b854 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -421,7 +421,7 @@ function wp_allow_comment($commentdata) { $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); } - if ( $userdata && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) { + if ( isset($userdata) && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) { // The author and the admins get respect. $approved = 1; } else {