Make WordPress Core

Ticket #27413: 27413.2.patch

File 27413.2.patch, 749 bytes (added by SergeyBiryukov, 11 years ago)
  • src/wp-includes/category-template.php

     
    622622        $args = wp_parse_args( $args, $defaults );
    623623        extract( $args, EXTR_SKIP );
    624624
    625         if ( empty( $tags ) )
     625        if ( empty( $tags ) ) {
    626626                return;
     627        }
    627628
    628629        // Juggle topic count tooltips:
    629630        if ( isset( $args['topic_count_text'] ) ) {
     
    645646        }
    646647
    647648        $tags_sorted = apply_filters( 'tag_cloud_sort', $tags, $args );
     649
     650        if ( empty( $tags_sorted ) ) {
     651                return;
     652        }
     653
    648654        if ( $tags_sorted != $tags  ) { // the tags have been sorted by a plugin
    649655                $tags = $tags_sorted;
    650656                unset($tags_sorted);