Make WordPress Core


Ignore:
Timestamp:
10/26/2013 02:53:30 AM (13 years ago)
Author:
nacin
Message:

3.7 regression from [25119]: Have in_category() return false when the first argument is empty.

Adds unit tests.

props ericlewis.
fixes #25706 for trunk.

File:
1 edited

Legend:

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

    r25662 r25923  
    233233 */
    234234function in_category( $category, $post = null ) {
     235        if ( empty( $category ) )
     236                return false;
     237
    235238        return has_category( $category, $post );
    236239}
Note: See TracChangeset for help on using the changeset viewer.