`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
This commit is contained in:
Scott Taylor 2015-02-26 05:37:34 +00:00
parent 9145a72789
commit a524e05572
1 changed files with 1 additions and 1 deletions

View File

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