Improve OutputPage::showErrorPage method documentation
[lhc/web/wiklou.git] / maintenance / generateJsonI18n.php
index 554e0a8..9c8354c 100644 (file)
@@ -97,7 +97,7 @@ class GenerateJsonI18n extends Maintenance {
                }
 
                $this->output( "All done.\n" );
-               $this->output( "Also add \$wgMessagesDirs['YourExtension'] = __DIR__ . /i18n';\n" );
+               $this->output( "Also add \$wgMessagesDirs['YourExtension'] = __DIR__ . '/i18n';\n" );
        }
 
        protected function doShim( $jsondir ) {
@@ -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] );
                                }