From 3b043a83082d196d7c04f260d2eef04e2ce9939b Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 6 Nov 2008 02:05:59 +0000 Subject: [PATCH] notice fixes git-svn-id: http://svn.automattic.com/wordpress/trunk@9541 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-ajax.php | 4 ++-- wp-includes/comment.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/admin-ajax.php b/wp-admin/admin-ajax.php index ca3b56342..aa5b6f3b0 100644 --- a/wp-admin/admin-ajax.php +++ b/wp-admin/admin-ajax.php @@ -517,8 +517,8 @@ case 'replyto-comment' : if ( empty($status) ) die('1'); - elseif ( in_array($status->post_status, array('draft', 'pending') ) ) - die( __('Error: you are replying to comment on a draft post.') ); + elseif ( in_array($status, array('draft', 'pending') ) ) + die( __('Error: you are replying to a comment on a draft post.') ); $user = wp_get_current_user(); if ( $user->ID ) { diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 3f0f064db..1ccb236c1 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -849,6 +849,8 @@ function wp_insert_comment($commentdata) { $comment_approved = 1; if ( ! isset($user_id) ) $user_id = 0; + if ( ! isset($comment_type) ) + $comment_type = ''; $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)