From 2a1dcbf551806480a2cc1295404725596412e6a0 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 29 Nov 2009 20:05:39 +0000 Subject: [PATCH] comment status transition was broken due to sneaky reference return in &get_comment. Props skeltoac git-svn-id: https://develop.svn.wordpress.org/trunk@12292 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index a32981ea4d..cdf6ae249d 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1262,7 +1262,7 @@ function wp_set_comment_status($comment_id, $comment_status, $wp_error = false) return false; } - $comment_old = get_comment($comment_id); + $comment_old = wp_clone(get_comment($comment_id)); if ( !$wpdb->update( $wpdb->comments, array('comment_approved' => $status), array('comment_ID' => $comment_id) ) ) { if ( $wp_error )