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

git-svn-id: http://svn.automattic.com/wordpress/trunk@9189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-10-15 20:47:56 +00:00
parent 5224736c99
commit 5b22c24e44
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