Make sure the first number in LIMIT clause in WP_Query::get_posts() is always an integer.
fixes #23383. git-svn-id: https://develop.svn.wordpress.org/trunk@28864 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ce8a35edd1
commit
f68d096c31
@ -2874,7 +2874,7 @@ class WP_Query {
|
|||||||
$page = 1;
|
$page = 1;
|
||||||
|
|
||||||
if ( empty($q['offset']) ) {
|
if ( empty($q['offset']) ) {
|
||||||
$pgstrt = ($page - 1) * $q['posts_per_page'] . ', ';
|
$pgstrt = absint( ( $page - 1 ) * $q['posts_per_page'] ) . ', ';
|
||||||
} else { // we're ignoring $page and using 'offset'
|
} else { // we're ignoring $page and using 'offset'
|
||||||
$q['offset'] = absint($q['offset']);
|
$q['offset'] = absint($q['offset']);
|
||||||
$pgstrt = $q['offset'] . ', ';
|
$pgstrt = $q['offset'] . ', ';
|
||||||
|
Loading…
Reference in New Issue
Block a user