Make WordPress Core

Changeset 28864


Ignore:
Timestamp:
06/27/2014 12:03:05 AM (10 years ago)
Author:
SergeyBiryukov
Message:

Make sure the first number in LIMIT clause in WP_Query::get_posts() is always an integer.

fixes #23383.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r28804 r28864  
    28752875
    28762876            if ( empty($q['offset']) ) {
    2877                 $pgstrt = ($page - 1) * $q['posts_per_page'] . ', ';
     2877                $pgstrt = absint( ( $page - 1 ) * $q['posts_per_page'] ) . ', ';
    28782878            } else { // we're ignoring $page and using 'offset'
    28792879                $q['offset'] = absint($q['offset']);
Note: See TracChangeset for help on using the changeset viewer.