Followup r84361, numerical keys ftw
authorSam Reed <reedy@users.mediawiki.org>
Sun, 20 Mar 2011 00:32:28 +0000 (00:32 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sun, 20 Mar 2011 00:32:28 +0000 (00:32 +0000)
includes/api/ApiQueryUsers.php

index 114708f..ff4d907 100644 (file)
@@ -258,11 +258,9 @@ class ApiQueryUsers extends ApiQueryBase {
                }
 
                $builtGroups = array();
-               $i = 0;
-               foreach( array_merge( $groups, Autopromote::getAutopromoteGroups( $user ) ) as $g ) {
+               foreach( array_merge( $groups, Autopromote::getAutopromoteGroups( $user ) ) as $i => $group ) {
                        $builtGroups[$i] = array( 'implicit' => '' );
-                       ApiResult::setContent( $builtGroups[$i], $g );
-                       $i++;
+                       ApiResult::setContent( $builtGroups[$i], $group );
                }
                return $builtGroups;
        }