From 5f74404560213bb70ed5008fbd0c36c645b3dd75 Mon Sep 17 00:00:00 2001 From: azaozz Date: Thu, 26 Nov 2009 05:22:09 +0000 Subject: [PATCH] Get the right number of pages then excluding a tree, fixes #11205 git-svn-id: http://svn.automattic.com/wordpress/trunk@12279 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wp-includes/post.php b/wp-includes/post.php index 5ce85f4799..80bf43a26e 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -2599,6 +2599,7 @@ function &get_pages($args = '') { foreach ( $children as $child ) $excludes[] = $child->ID; $excludes[] = $exclude; + $num_pages = count($pages); for ( $i = 0; $i < $num_pages; $i++ ) { if ( in_array($pages[$i]->ID, $excludes) ) unset($pages[$i]);