Ticket #21512: 21512.patch
| File 21512.patch, 605 bytes (added by , 14 years ago) |
|---|
-
wp-includes/comment.php
655 655 $post_author = $wpdb->get_var($wpdb->prepare("SELECT post_author FROM $wpdb->posts WHERE ID = %d LIMIT 1", $comment_post_ID)); 656 656 } 657 657 658 if ( $user && ( $user_id == $post_author || $user->has_cap('moderate_comments') ) ) {658 if ( isset( $user ) && ( $user_id == $post_author || $user->has_cap( 'moderate_comments' ) ) ) { 659 659 // The author and the admins get respect. 660 660 $approved = 1; 661 661 } else {