Legoktm has uploaded a new change for review.
https://gerrit.wikimedia.org/r/206991
Change subject: require_once instead of depending on the return value of
include_once
......................................................................
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
(cherry picked from commit 7959f93c30e4b845ea8f4f5d2262b30b8a89c980)
---
M maintenance/mergeMessageFileList.php
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/91/206991/1
diff --git a/maintenance/mergeMessageFileList.php
b/maintenance/mergeMessageFileList.php
index 43fa460..b491497 100644
--- a/maintenance/mergeMessageFileList.php
+++ b/maintenance/mergeMessageFileList.php
@@ -173,10 +173,8 @@
// 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;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/206991
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I48b9a55d5f9e85efe515d87b56b60ee71f939842
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_25
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: 20after4 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits