mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
Check that there is a comment_agent to filter and otherwise filter an empty string. Fixes a notice during import from old WXR files. See #11484.
git-svn-id: https://develop.svn.wordpress.org/trunk@12470 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
af1919accd
commit
949645fa78
@ -1137,7 +1137,7 @@ function wp_filter_comment($commentdata) {
|
||||
$commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']);
|
||||
elseif ( isset($commentdata['user_id']) )
|
||||
$commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_id']);
|
||||
$commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', $commentdata['comment_agent']);
|
||||
$commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', ( isset( $commentdata['comment_agent'] ) ? $commentdata['comment_agent'] : '' ) );
|
||||
$commentdata['comment_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']);
|
||||
$commentdata['comment_content'] = apply_filters('pre_comment_content', $commentdata['comment_content']);
|
||||
$commentdata['comment_author_IP'] = apply_filters('pre_comment_user_ip', $commentdata['comment_author_IP']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user