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: http://svn.automattic.com/wordpress/trunk@12470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cd4fd77beb
commit
95b7e055ce
|
@ -1137,7 +1137,7 @@ function wp_filter_comment($commentdata) {
|
||||||
$commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']);
|
$commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']);
|
||||||
elseif ( isset($commentdata['user_id']) )
|
elseif ( isset($commentdata['user_id']) )
|
||||||
$commentdata['user_id'] = apply_filters('pre_user_id', $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_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']);
|
||||||
$commentdata['comment_content'] = apply_filters('pre_comment_content', $commentdata['comment_content']);
|
$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']);
|
$commentdata['comment_author_IP'] = apply_filters('pre_comment_user_ip', $commentdata['comment_author_IP']);
|
||||||
|
|
Loading…
Reference in New Issue