Make WordPress Core


Ignore:
Timestamp:
12/20/2007 05:29:52 AM (19 years ago)
Author:
ryan
Message:

Orphaned page fix from hailin. fixes #5498

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r6403 r6427  
    261261                return true;
    262262
    263         for ( $i=0; $i < count($children_pages); $i++ ) {
     263        for ( $i = 0; $i < count($children_pages); $i++ ) {
    264264
    265265                $child = $children_pages[$i];
    266266                       
    267267                if ( $child->post_parent == $id ) {
    268                 array_splice($children_pages, $i, 1);
     268                        array_splice($children_pages, $i, 1);
    269269                        display_page_row($child, $children_pages, $level+1);
    270                         $i--;
     270                        $i = -1; //as numeric keys in $children_pages are not preserved after splice
    271271                }
    272272        }
Note: See TracChangeset for help on using the changeset viewer.