From f50600bc1319f56729f6ef2adc70a73363d86b3c Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 28 May 2009 18:06:08 +0000 Subject: [PATCH] Fix parent=0 queries. Props Denis-de-Bernardy 107 minutes ago. . fixes #9960 git-svn-id: http://svn.automattic.com/wordpress/trunk@11476 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index f5ac4f5d8..12f86a374 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -630,7 +630,7 @@ function &get_terms($taxonomies, $args = '') { $args['number'] = absint( $args['number'] ); $args['offset'] = absint( $args['offset'] ); if ( !$single_taxonomy || !is_taxonomy_hierarchical($taxonomies[0]) || - '' != $args['parent'] ) { + '' !== $args['parent'] ) { $args['child_of'] = 0; $args['hierarchical'] = false; $args['pad_counts'] = false; @@ -745,7 +745,7 @@ function &get_terms($taxonomies, $args = '') { if ( !empty($name__like) ) $where .= " AND t.name LIKE '{$name__like}%'"; - if ( '' != $parent ) { + if ( '' !== $parent ) { $parent = (int) $parent; $where .= " AND tt.parent = '$parent'"; } @@ -754,7 +754,7 @@ function &get_terms($taxonomies, $args = '') { $where .= ' AND tt.count > 0'; // don't limit the query results when we have to descend the family tree - if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' == $parent ) { + if ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' === $parent ) { if( $offset ) $limit = 'LIMIT ' . $offset . ',' . $number; else