WordPress.org

Make WordPress Core

Changeset 38777


Ignore:
Timestamp:
10/11/16 03:26:11 (9 months ago)
Author:
dd32
Message:

Taxonomy: Avoid a fatal error in the_tags() in the event that get_the_term_list() returns a WP_Error.

Props michalzuber.
See #37291.

File:
1 edited

Legend:

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

    r38307 r38777  
    11431143    if ( null === $before ) 
    11441144        $before = __('Tags: '); 
    1145     echo get_the_tag_list($before, $sep, $after); 
     1145 
     1146    $the_tags = get_the_tag_list( $before, $sep, $after ); 
     1147 
     1148    if ( ! is_wp_error( $the_tags ) ) { 
     1149        echo $the_tags; 
     1150    } 
    11461151} 
    11471152 
Note: See TracChangeset for help on using the changeset viewer.