mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-08 17:38:26 +01:00
If $p evaluates to zero, ignore it.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
888021c22a
commit
90d0421792
@ -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'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user