Fix Notice on comment posting.
git-svn-id: http://svn.automattic.com/wordpress/trunk@10042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3ed7af59cf
commit
cfbc31027e
|
@ -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));
|
$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.
|
// The author and the admins get respect.
|
||||||
$approved = 1;
|
$approved = 1;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue