Make WordPress Core

Ticket #21155: 21155.diff

File 21155.diff, 483 bytes (added by batmoo, 13 years ago)
  • wp-includes/category-template.php

     
    7373 */
    7474function get_the_category( $id = false ) {
    7575        $categories = get_the_terms( $id, 'category' );
    76         if ( ! $categories )
     76        if ( ! $categories || is_wp_error( $categories ) )
    7777                $categories = array();
    7878
    7979        $categories = array_values( $categories );