WordPress.org

Make WordPress Core

Changeset 11031


Ignore:
Timestamp:
04/21/09 19:42:28 (5 years ago)
Author:
ryan
Message:

Fix typing in cat_is_ancestor_of(). Props filosofo. fixes #9614

File:
1 edited

Legend:

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

    r10959 r11031  
    201201 */ 
    202202function cat_is_ancestor_of( $cat1, $cat2 ) { 
    203     if ( is_int( $cat1 ) ) 
     203    if ( ! isset($cat1->term_id) ) 
    204204        $cat1 = &get_category( $cat1 ); 
    205     if ( is_int( $cat2 ) ) 
     205    if ( ! isset($cat2->parent) ) 
    206206        $cat2 = &get_category( $cat2 ); 
    207207 
    208     if ( !$cat1->term_id || !$cat2->parent ) 
     208    if ( empty($cat1->term_id) || empty($cat2->parent) ) 
    209209        return false; 
    210  
    211210    if ( $cat2->parent == $cat1->term_id ) 
    212211        return true; 
Note: See TracChangeset for help on using the changeset viewer.