From a524e05572be715417896c779906edca475379a9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 26 Feb 2015 05:37:34 +0000 Subject: [PATCH] `wp_insert_comment()` should be checking and setting `$compacted`, not the non-existent `$post_data`. See [31263], #21212. git-svn-id: https://develop.svn.wordpress.org/trunk@31553 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index f0c71af2bb..b1828c3fde 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -2053,7 +2053,7 @@ function wp_insert_comment( $commentdata ) { foreach( $fields as $field ) { if ( isset( $compacted[ $field ] ) ) { - $post_data[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->comments, $field, $compacted[ $field ] ); + $compacted[ $field ] = $wpdb->strip_invalid_text_for_column( $wpdb->comments, $field, $compacted[ $field ] ); } }