Glaisher has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/247873

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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/73/247873/1

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: newchange
Gerrit-Change-Id: I4ddfc2dc6cb0ed625fc3b89e21f56d75575377b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Glaisher <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to