mirror of
git://develop.git.wordpress.org/
synced 2025-02-24 08:33:35 +01:00
Move another sizeof out of the loop. See #7147.
git-svn-id: https://develop.svn.wordpress.org/trunk@8118 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a1c42c6c0b
commit
5abf4bfe1b
@ -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--;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user