Make WordPress Core

Changeset 27514 for trunk


Ignore:
Timestamp:
03/12/2014 12:53:49 PM (11 years ago)
Author:
SergeyBiryukov
Message:

Avoid a notice in trackback_rdf() if user agent is not set.

props joostdevalk.
fixes #27374.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r27283 r27514  
    942942 */
    943943function trackback_rdf( $deprecated = '' ) {
    944     if ( !empty( $deprecated ) )
     944    if ( ! empty( $deprecated ) ) {
    945945        _deprecated_argument( __FUNCTION__, '2.5' );
    946 
    947     if ( false !== stripos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') )
     946    }
     947
     948    if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && false !== stripos( $_SERVER['HTTP_USER_AGENT'], 'W3C_Validator' ) ) {
    948949        return;
     950    }
    949951
    950952    echo '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Note: See TracChangeset for help on using the changeset viewer.