From 8343fabff6a4b70ae57e81c9018f136fc5dc51d4 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 12 Mar 2014 12:54:15 +0000 Subject: [PATCH] Avoid a notice in trackback_rdf() if user agent is not set. props joostdevalk. fixes #27374. Built from https://develop.svn.wordpress.org/trunk@27514 git-svn-id: http://core.svn.wordpress.org/trunk@27357 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 97e2c2ba3d..b87844b601 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -941,11 +941,13 @@ function trackback_url( $deprecated_echo = true ) { * @param int $deprecated Not used (Was $timezone = 0). */ function trackback_rdf( $deprecated = '' ) { - if ( !empty( $deprecated ) ) + if ( ! empty( $deprecated ) ) { _deprecated_argument( __FUNCTION__, '2.5' ); + } - if ( false !== stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') ) + if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && false !== stripos( $_SERVER['HTTP_USER_AGENT'], 'W3C_Validator' ) ) { return; + } echo '