Make WordPress Core

Ticket #25429: 25429.diff

File 25429.diff, 998 bytes (added by ericmann, 13 years ago)
  • wp-includes/category-template.php

     
    136136function get_the_category_by_ID( $cat_ID ) {
    137137        $cat_ID = (int) $cat_ID;
    138138        $category = get_category( $cat_ID );
    139         if ( is_wp_error( $category ) )
     139        if ( null === $category || is_wp_error( $category ) )
    140140                return $category;
    141141        return $category->name;
    142142}
  • wp-includes/category.php

     
    8080 */
    8181function get_category( $category, $output = OBJECT, $filter = 'raw' ) {
    8282        $category = get_term( $category, 'category', $output, $filter );
    83         if ( is_wp_error( $category ) )
     83        if ( null === $category || is_wp_error( $category ) )
    8484                return $category;
    8585
    8686        _make_cat_compat( $category );