From c92bf9b2f458d4ba4bebab4cf7c6c7718d95885d Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Thu, 20 Dec 2007 05:29:52 +0000 Subject: [PATCH] Orphaned page fix from hailin. fixes #5498 git-svn-id: https://develop.svn.wordpress.org/trunk@6427 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 376de80049..06daaa1704 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -260,14 +260,14 @@ function display_page_row( $page, &$children_pages, $level = 0 ) { if ( ! $children_pages ) return true; - for ( $i=0; $i < count($children_pages); $i++ ) { + for ( $i = 0; $i < count($children_pages); $i++ ) { $child = $children_pages[$i]; if ( $child->post_parent == $id ) { - array_splice($children_pages, $i, 1); + array_splice($children_pages, $i, 1); display_page_row($child, $children_pages, $level+1); - $i--; + $i = -1; //as numeric keys in $children_pages are not preserved after splice } } }