Move another sizeof out of the loop. See #7147.

git-svn-id: http://svn.automattic.com/wordpress/trunk@8118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-06-18 06:48:48 +00:00
parent 14adf33381
commit 27c4f3c987
1 changed files with 3 additions and 1 deletions

View File

@ -510,12 +510,14 @@ class Walker {
if ( !$top_level_elements ) {
$root = $children_elements[0];
for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) {
$num_elements = sizeof($children_elements);
for ( $i = 0; $i < $num_elements; $i++ ) {
$child = $children_elements[$i];
if ($root->$parent_field == $child->$parent_field ) {
$top_level_elements[] = $child;
array_splice( $children_elements, $i, 1 );
$num_elements--;
$i--;
}
}