From aebf8f0fea3dfe1f9724bac2e502f130b3573eca Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 27 Jun 2014 00:04:16 +0000 Subject: [PATCH] Make sure the first number in LIMIT clause in WP_Query::get_posts() is always an integer. fixes #23383. Built from https://develop.svn.wordpress.org/trunk@28864 git-svn-id: http://core.svn.wordpress.org/trunk@28664 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index e7e60d5233..e348c1f729 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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'] . ', '; diff --git a/wp-includes/version.php b/wp-includes/version.php index 9522bdc96f..61cea8b307 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.0-alpha-20140626'; +$wp_version = '4.0-alpha-20140627'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.