X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FgenerateJsonI18n.php;h=a84f2ae52c789e4c98873d05d0450290728da21b;hb=75483c87221833b87e877361cd918bc58e2ba255;hp=0b4f2ede9d5097cf83546c73e401ef73922cb8e3;hpb=4dc3ac1c375b3d2eb6172dfef8fdebe71b8c5f43;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/generateJsonI18n.php b/maintenance/generateJsonI18n.php index 0b4f2ede9d..a84f2ae52c 100644 --- a/maintenance/generateJsonI18n.php +++ b/maintenance/generateJsonI18n.php @@ -108,6 +108,7 @@ class GenerateJsonI18n extends Maintenance { if ( !is_readable( $phpfile ) ) { $this->error( "Error reading $phpfile", 1 ); } + $messages = null; include $phpfile; $phpfileContents = file_get_contents( $phpfile ); @@ -131,7 +132,7 @@ class GenerateJsonI18n extends Maintenance { ) ); // Make sure the @metadata key is the first key in the output $langmsgs = array_merge( - array( '@metadata' => array( 'authors' => $authors ) ), + [ '@metadata' => [ 'authors' => $authors ] ], $langmsgs ); @@ -187,7 +188,7 @@ class GenerateJsonI18n extends Maintenance { $matches = null; preg_match_all( '/@author (.*?)$/m', $comment, $matches ); - return $matches && $matches[1] ? $matches[1] : array(); + return $matches && $matches[1] ? $matches[1] : []; } }