Notice fix and don't count inside a loop. Fixes #7653 props ryan.

git-svn-id: https://develop.svn.wordpress.org/trunk@9189 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2008-10-15 20:47:56 +00:00
parent 6bbd750157
commit 19bc50ea03
1 changed files with 3 additions and 1 deletions

View File

@ -2031,8 +2031,10 @@ function wp_sprintf_l($pattern, $args) {
if ( count($args) == 1 )
$result .= $l['between_only_two'] . array_shift($args);
// Loop when more than two args
while ( count($args) ) {
$i = count($args);
while ( $i ) {
$arg = array_shift($args);
$i--;
if ( $i == 1 )
$result .= $l['between_last_two'] . $arg;
else