From 422b5cd65c95205d7bd7a4fc631ff6e44774ceec Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 19 Nov 2006 00:58:15 +0000 Subject: [PATCH] ceil() max_num_pages. Props MattRead. fixes #3368 git-svn-id: http://svn.automattic.com/wordpress/trunk@4488 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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) ) {