From 45984c58eb5d70c2ac5326bbbe629f15a8107673 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Sun, 19 Nov 2006 00:58:15 +0000 Subject: [PATCH] ceil() max_num_pages. Props MattRead. fixes #3368 git-svn-id: https://develop.svn.wordpress.org/trunk@4488 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index 0b70ef47e3..32bb714d11 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -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) ) {