jenkins-bot has submitted this change and it was merged. Change subject: SpecialPageTranslationMovePage: Don't pass strings to Title::newFromText ......................................................................
SpecialPageTranslationMovePage: Don't pass strings to Title::newFromText $par can be null if a subpage parameter was not provided. Bug: T99536 Change-Id: I4ddfc2dc6cb0ed625fc3b89e21f56d75575377b8 --- M tag/SpecialPageTranslationMovePage.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/tag/SpecialPageTranslationMovePage.php b/tag/SpecialPageTranslationMovePage.php index 086a402..dd64654 100644 --- a/tag/SpecialPageTranslationMovePage.php +++ b/tag/SpecialPageTranslationMovePage.php @@ -69,11 +69,15 @@ /** * Partially copies from SpecialMovepage.php, because it cannot be * extended in other ways. + * + * @param string|null $par null if subpage not provided, string otherwise */ public function execute( $par ) { $request = $this->getRequest(); $user = $this->getUser(); + $par = is_null( $par ) ? '' : $par; // Title::newFromText expects strings only + // Yes, the use of getVal() and getText() is wanted, see bug T22365 $this->oldText = $request->getVal( 'wpOldTitle', $request->getVal( 'target', $par ) ); $this->newText = $request->getText( 'wpNewTitle' ); -- To view, visit https://gerrit.wikimedia.org/r/247873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4ddfc2dc6cb0ed625fc3b89e21f56d75575377b8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Glaisher <glaisher.w...@gmail.com> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: Siebrand <siebr...@kitano.nl> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits