Make WordPress Core

Changeset 16478


Ignore:
Timestamp:
11/19/2010 05:06:48 AM (14 years ago)
Author:
ryan
Message:

Return false if empty cat passed. Restores old behavior.

File:
1 edited

Legend:

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

    r16469 r16478  
    222222 */
    223223function in_category( $category, $post = null ) {
     224    if ( empty( $category ) )
     225        return false;
     226
    224227    return has_term( $category, 'category', $post );
    225228}
Note: See TracChangeset for help on using the changeset viewer.