Follow-up I49b7d8a - Add api module for common metadata
[lhc/web/wiklou.git] / 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] );
                                }