WordPress.org

Make WordPress Core

Changeset 8118


Ignore:
Timestamp:
06/18/2008 06:48:48 AM (11 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/classes.php

    r8111 r8118  
    511511
    512512            $root = $children_elements[0];
    513             for ( $i = 0; $i < sizeof( $children_elements ); $i++ ) {
     513            $num_elements = sizeof($children_elements);
     514            for ( $i = 0; $i < $num_elements; $i++ ) {
    514515
    515516                $child = $children_elements[$i];
     
    517518                    $top_level_elements[] = $child;
    518519                    array_splice( $children_elements, $i, 1 );
     520                    $num_elements--;
    519521                    $i--;
    520522                }
Note: See TracChangeset for help on using the changeset viewer.