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:
Sergey Biryukov 2014-06-27 00:03:05 +00:00
parent ce8a35edd1
commit f68d096c31
1 changed files with 1 additions and 1 deletions

View File

@ -2874,7 +2874,7 @@ class WP_Query {
$page = 1;
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'
$q['offset'] = absint($q['offset']);
$pgstrt = $q['offset'] . ', ';