get_comment_to_edit() should return false when the comment does not exist or is marked as spam. props Westi. fixes #4533.

git-svn-id: http://svn.automattic.com/wordpress/trunk@5757 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-06-25 21:30:18 +00:00
parent 267997a4fd
commit b1a12f6718
1 changed files with 2 additions and 1 deletions

View File

@ -41,7 +41,8 @@ function edit_comment() {
}
function get_comment_to_edit( $id ) {
$comment = get_comment( $id );
if ( !$comment = get_comment($id) )
return false;
$comment->comment_ID = (int) $comment->comment_ID;
$comment->comment_post_ID = (int) $comment->comment_post_ID;