Fix Special:NewSection showNoRedirectPage form handling
authorDannyS712 <DannyS712.enwiki@gmail.com>
Wed, 7 Aug 2019 21:18:04 +0000 (21:18 +0000)
committerMobrovac <mobrovac@wikimedia.org>
Wed, 7 Aug 2019 21:22:51 +0000 (21:22 +0000)
Bug: T207577
Change-Id: I3e476dffb4cb32b47f0f2f55e0f77ed74e85f302

includes/specials/SpecialNewSection.php

index b503141..62379f5 100644 (file)
@@ -60,7 +60,8 @@ class SpecialNewSection extends RedirectSpecialPage {
        }
 
        public function onFormSubmit( $formData ) {
-               $page = $formData['page'];
+               $title = $formData['page'];
+               $page = Title::newFromText( $title );
                $query = [ 'action' => 'edit', 'section' => 'new' ];
                $url = $page->getFullUrlForRedirect( $query );
                $this->getOutput()->redirect( $url );