Make WordPress Core


Ignore:
Timestamp:
05/28/2009 06:06:08 PM (16 years ago)
Author:
ryan
Message:

Fix parent=0 queries. Props Denis-de-Bernardy 107 minutes ago. . fixes #9960

File:
1 edited

Legend:

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

    r11469 r11476  
    631631    $args['offset'] = absint( $args['offset'] );
    632632    if ( !$single_taxonomy || !is_taxonomy_hierarchical($taxonomies[0]) ||
    633         '' != $args['parent'] ) {
     633        '' !== $args['parent'] ) {
    634634        $args['child_of'] = 0;
    635635        $args['hierarchical'] = false;
     
    746746        $where .= " AND t.name LIKE '{$name__like}%'";
    747747
    748     if ( '' != $parent ) {
     748    if ( '' !== $parent ) {
    749749        $parent = (int) $parent;
    750750        $where .= " AND tt.parent = '$parent'";
     
    755755
    756756    // don't limit the query results when we have to descend the family tree
    757     if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' == $parent ) {
     757    if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' === $parent ) {
    758758        if( $offset )
    759759            $limit = 'LIMIT ' . $offset . ',' . $number;
Note: See TracChangeset for help on using the changeset viewer.