Do not pass null to Title::newFromText in Special:MyLanguage
authorNiklas Laxström <niklas.laxstrom@gmail.com>
Tue, 7 Apr 2015 10:45:47 +0000 (12:45 +0200)
committerNikerabbit <niklas.laxstrom@gmail.com>
Tue, 7 Apr 2015 10:49:43 +0000 (10:49 +0000)
This currently breaks phpunit integration test in Translate.

Change-Id: Ibdc04e9e20c0264076d7a8766ac9a4826033371e

includes/specials/SpecialMyLanguage.php

index 6cea158..fce1cdc 100644 (file)
@@ -63,6 +63,7 @@ class SpecialMyLanguage extends RedirectSpecialArticle {
         * @return Title|null
         */
        public function findTitle( $par ) {
+               $par = (string)$par;
                // base = title without language code suffix
                // provided = the title as it was given
                $base = $provided = Title::newFromText( $par );