From fe196958e6daad179df1c9ff016b071d28750cc2 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 28 Dec 2004 17:36:28 +0000 Subject: [PATCH] If $p evaluates to zero, ignore it. git-svn-id: https://develop.svn.wordpress.org/trunk@2007 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/classes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 7c1e34ce8b..ad7ec0fd44 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -65,7 +65,7 @@ class WP_Query { if ('' != $qv['name']) { $this->is_single = true; - } else if (($qv['p'] != '') && ($qv['p'] != 'all')) { + } else if (($qv['p'] != '') && ($qv['p'] != 'all') && (intval($q['p']) != 0)) { $this->is_single = true; } else if (('' != $qv['hour']) && ('' != $qv['minute']) &&('' != $qv['second']) && ('' != $qv['year']) && ('' != $qv['monthnum']) && ('' != $qv['day'])) { // If year, month, day, hour, minute, and second are set, a single @@ -293,7 +293,7 @@ class WP_Query { } // If a post number is specified, load that post - if (($q['p'] != '') && ($q['p'] != 'all')) { + if (($q['p'] != '') && ($q['p'] != 'all') && intval($q['p']) != 0) { $q['p'] = (int) $q['p']; $where = ' AND ID = ' . $q['p']; }