jenkins-bot has submitted this change and it was merged.
Change subject: Fix ttmserver-export for MediaWiki 1.28
......................................................................
Fix ttmserver-export for MediaWiki 1.28
Bug: T136919
Change-Id: I98e10a4329f1a9f7cb01d935e565fa213f15b76e
---
M scripts/ttmserver-export.php
1 file changed, 10 insertions(+), 5 deletions(-)
Approvals:
DCausse: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/ttmserver-export.php b/scripts/ttmserver-export.php
index 151ab37..fab1f2c 100644
--- a/scripts/ttmserver-export.php
+++ b/scripts/ttmserver-export.php
@@ -207,13 +207,18 @@
}
protected function resetStateForFork() {
- // Child, reseed because there is no bug in PHP:
- // http://bugs.php.net/bug.php?id=42465
- mt_srand( getmypid() );
-
// Make sure all existing connections are dead,
// we can't use them in forked children.
- LBFactory::destroyInstance();
+ if ( method_exists( 'MediaWiki\MediaWikiServices',
'resetChildProcessServices' ) ) {
+
MediaWiki\MediaWikiServices::resetChildProcessServices();
+ } else {
+ // BC for MediaWiki <= 1.27
+ LBFactory::destroyInstance();
+
+ // Child, reseed because there is no bug in PHP:
+ // http://bugs.php.net/bug.php?id=42465
+ mt_srand( getmypid() );
+ }
}
}
--
To view, visit https://gerrit.wikimedia.org/r/292530
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I98e10a4329f1a9f7cb01d935e565fa213f15b76e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit <[email protected]>
Gerrit-Reviewer: DCausse <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits