mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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:
parent
267997a4fd
commit
b1a12f6718
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user