From 7959f93c30e4b845ea8f4f5d2262b30b8a89c980 Mon Sep 17 00:00:00 2001 From: Mukunda Modell Date: Wed, 22 Apr 2015 17:34:25 -0500 Subject: [PATCH] require_once instead of depending on the return value of include_once return value from include_once is unreliable, it could be the value of a 'return;' statement in the included file, or it could be false when the file wasn't readable. This was breaking deployments because one of the extensions had "return;" which caused include_once to return a falsy value. Change-Id: I48b9a55d5f9e85efe515d87b56b60ee71f939842 --- maintenance/mergeMessageFileList.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/maintenance/mergeMessageFileList.php b/maintenance/mergeMessageFileList.php index 43fa4603f4..b4914971ab 100644 --- a/maintenance/mergeMessageFileList.php +++ b/maintenance/mergeMessageFileList.php @@ -173,10 +173,8 @@ foreach ( $mmfl['setupFiles'] as $fileName ) { // Using extension.json or skin.json if ( substr( $fileName, -strlen( '.json' ) ) === '.json' ) { $queue[$fileName] = 1; - } elseif ( !( include_once $fileName ) ) { - // Include the extension to update $wgExtensionMessagesFiles - fwrite( STDERR, "Unable to read $fileName\n" ); - exit( 1 ); + } else { + require_once $fileName; } } -- 2.20.1