jenkins-bot has submitted this change and it was merged. Change subject: Do not pass nulls to Title::newFromText ......................................................................
Do not pass nulls to Title::newFromText $par defaults to null. Simplest is to convert it to (empty) string and let Title::newFromText return null. Change-Id: I85a8ef58daf1fbfa5ced298213f6b7f9ab304e94 --- M specials/SpecialTranslations.php M tag/SpecialPageTranslationDeletePage.php 2 files changed, 4 insertions(+), 0 deletions(-) Approvals: Legoktm: Looks good to me, approved jenkins-bot: Verified diff --git a/specials/SpecialTranslations.php b/specials/SpecialTranslations.php index 973ead9..203391e 100644 --- a/specials/SpecialTranslations.php +++ b/specials/SpecialTranslations.php @@ -36,6 +36,8 @@ $out = $this->getOutput(); + $par = (string)$par; + if ( $this->including() ) { $title = Title::newFromText( $par ); if ( !$title ) { diff --git a/tag/SpecialPageTranslationDeletePage.php b/tag/SpecialPageTranslationDeletePage.php index 87dbefd..943a449 100644 --- a/tag/SpecialPageTranslationDeletePage.php +++ b/tag/SpecialPageTranslationDeletePage.php @@ -55,6 +55,8 @@ public function execute( $par ) { $request = $this->getRequest(); + $par = (string)$par; + // Yes, the use of getVal() and getText() is wanted, see bug T22365 $this->text = $request->getVal( 'wpTitle', $par ); $this->title = Title::newFromText( $this->text ); -- To view, visit https://gerrit.wikimedia.org/r/202350 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I85a8ef58daf1fbfa5ced298213f6b7f9ab304e94 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Translate Gerrit-Branch: master Gerrit-Owner: Nikerabbit <niklas.laxst...@gmail.com> Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits