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 ] ); } }