From 77f5f54ff7a31bd3e9f7dd3f4f3a2e42b7ab83f5 Mon Sep 17 00:00:00 2001 From: scribu Date: Thu, 9 Dec 2010 19:36:33 +0000 Subject: [PATCH] Correct relation var and PHP4 constructor. See #15752 git-svn-id: https://develop.svn.wordpress.org/trunk@16850 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 4f3ffbbfe3..515baebdd3 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -535,7 +535,7 @@ class WP_Tax_Query { var $relation = ''; var $queries = array(); - function __construct( &$tax_query ) { + function WP_Tax_Query( &$tax_query ) { if ( isset( $tax_query['relation'] ) && strtoupper( $tax_query['relation'] ) == 'OR' ) { $this->relation = 'OR'; } else { @@ -599,7 +599,7 @@ class WP_Tax_Query { if ( 'IN' == $operator ) { if ( empty( $terms ) ) { - if ( 'OR' == $relation ) + if ( 'OR' == $this->relation ) continue; else return array( 'join' => '', 'where' => ' AND 0 = 1' ); @@ -633,7 +633,7 @@ class WP_Tax_Query { } if ( !empty( $where ) ) - $where = ' AND ( ' . implode( " $relation ", $where ) . ' )'; + $where = ' AND ( ' . implode( " $this->relation ", $where ) . ' )'; else $where = '';