`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:
parent
9145a72789
commit
a524e05572
|
@ -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 ] );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue