WordPress.org

Make WordPress Core

Ticket #7653: 7653.diff

File 7653.diff, 540 bytes (added by ryan, 10 years ago)

Don't count in loop

  • wp-includes/formatting.php

     
    20292029        if ( count($args) == 1 )
    20302030                $result .= $l['between_only_two'] . array_shift($args);
    20312031        // Loop when more than two args
    2032         while ( count($args) ) {
    2033                 $arg = array_shift($args);
     2032        $i = count($args);
     2033        while ( $i ) {
     2034                $arg = array_shift($args); $i--;
    20342035                if ( $i == 1 )
    20352036                        $result .= $l['between_last_two'] . $arg;
    20362037                else