From fb8bd1dbec8ae8be90d7aad27aa8ca30ef3d144c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 16 Jan 2007 22:37:15 +0000 Subject: [PATCH] Fix SQL error when excluding empty cat. fixes #3598 git-svn-id: https://develop.svn.wordpress.org/trunk@4754 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/query.php b/wp-includes/query.php index 4a931ec1ca..cd19c4c740 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -804,6 +804,8 @@ class WP_Query { } if ( strlen($out_posts) > 0 ) $out_cats = " AND ID NOT IN ($out_posts)"; + else + $out_cats = ''; } $whichcat = $in_cats . $out_cats; $groupby = "{$wpdb->posts}.ID";