mergeMessageFileList.php: abort on read error
authorTim Starling <tstarling@wikimedia.org>
Fri, 5 Apr 2013 01:03:31 +0000 (12:03 +1100)
committerTim Starling <tstarling@wikimedia.org>
Fri, 5 Apr 2013 01:03:31 +0000 (12:03 +1100)
If there is a parse error or if one of the files in the extension list
doesn't exist, exit with an error. mw-update-l10n has set -e so it will
abort without syncing the new file.

Change-Id: Idaad65783127b075626c102a8dc02e22df1588b7

maintenance/mergeMessageFileList.php

index 62596b2..fbba977 100644 (file)
@@ -98,7 +98,10 @@ foreach ( $mmfl['setupFiles'] as $fileName ) {
        if ( empty( $mmfl['quiet'] ) ) {
                fwrite( STDERR, "Loading data from $fileName\n" );
        }
-       include_once( $fileName );
+       if ( !include_once( $fileName ) ) {
+               fwrite( STDERR, "Unable to read $fileName\n" );
+               exit( 1 );
+       }
 }
 fwrite( STDERR, "\n" );
 $s =