ceil() max_num_pages. Props MattRead. fixes #3368

git-svn-id: https://develop.svn.wordpress.org/trunk@4488 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2006-11-19 00:58:15 +00:00
parent 67ce2d8d4f
commit 45984c58eb
1 changed files with 1 additions and 1 deletions

View File

@ -980,7 +980,7 @@ class WP_Query {
$this->posts = $wpdb->get_results($this->request);
if ( !empty($limits) ) {
$this->found_posts = $wpdb->get_var('SELECT FOUND_ROWS()');
$this->max_num_pages = $this->found_posts / $q['posts_per_page'];
$this->max_num_pages = ceil($this->found_posts / $q['posts_per_page']);
}
// Check post status to determine if post should be displayed.
if ( !empty($this->posts) && ($this->is_single || $this->is_page) ) {