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: https://develop.svn.wordpress.org/trunk@5757 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-06-25 21:30:18 +00:00
parent 66ec9bee20
commit a58adaafff

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;