notice fixes

git-svn-id: https://develop.svn.wordpress.org/trunk@9541 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-06 02:05:59 +00:00
parent e1235cf59f
commit d88ff155c1
2 changed files with 4 additions and 2 deletions

View File

@ -517,8 +517,8 @@ case 'replyto-comment' :
if ( empty($status) ) if ( empty($status) )
die('1'); die('1');
elseif ( in_array($status->post_status, array('draft', 'pending') ) ) elseif ( in_array($status, array('draft', 'pending') ) )
die( __('Error: you are replying to comment on a draft post.') ); die( __('Error: you are replying to a comment on a draft post.') );
$user = wp_get_current_user(); $user = wp_get_current_user();
if ( $user->ID ) { if ( $user->ID ) {

View File

@ -849,6 +849,8 @@ function wp_insert_comment($commentdata) {
$comment_approved = 1; $comment_approved = 1;
if ( ! isset($user_id) ) if ( ! isset($user_id) )
$user_id = 0; $user_id = 0;
if ( ! isset($comment_type) )
$comment_type = '';
$result = $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->comments $result = $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->comments
(comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent, comment_type, comment_parent, user_id) (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent, comment_type, comment_parent, user_id)