Do not suggest to use unused local vars
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 8 Jan 2014 18:27:10 +0000 (19:27 +0100)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Wed, 8 Jan 2014 18:27:10 +0000 (19:27 +0100)
Change-Id: I4c2ab60054304593a9fd873b28e160b9d07442f0

maintenance/generateJsonI18n.php

index 3b7a652..9c8354c 100644 (file)
@@ -110,7 +110,7 @@ $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = function ( $cache, $code, &$
                $fileName = __DIR__ . "/{{OUT}}/$csCode.json";
                if ( is_readable( $fileName ) ) {
                        $data = FormatJson::decode( file_get_contents( $fileName ), true );
-                       foreach ( $data as $key => $unused ) {
+                       foreach ( array_keys( $data ) as $key ) {
                                if ( $key === '' || $key[0] === '@' ) {
                                        unset( $data[$key] );
                                }