Fix param order of a Title::newFromText call in MediaWiki
authorAlex Monk <krenair@gmail.com>
Tue, 7 Apr 2015 01:01:45 +0000 (02:01 +0100)
committerAlex Monk <krenair@gmail.com>
Tue, 7 Apr 2015 01:01:45 +0000 (02:01 +0100)
Otherwise it throws an exception on the latest master (I2b36b7a3)

I'm kind of surprised this didn't break when it was introduced in I60f44a10

Change-Id: I62f12aa9267d0812c3689064f512298187ac3c84

includes/MediaWiki.php

index 68d03c8..86531bb 100644 (file)
@@ -529,7 +529,7 @@ class MediaWiki {
                                        wfDebugLog( 'RedirectedPosts', "Redirected from HTTP to HTTPS: $oldUrl" );
                                }
                                // Setup dummy Title, otherwise OutputPage::redirect will fail
-                               $title = Title::newFromText( NS_MAIN, 'REDIR' );
+                               $title = Title::newFromText( 'REDIR', NS_MAIN );
                                $this->context->setTitle( $title );
                                $output = $this->context->getOutput();
                                // Since we only do this redir to change proto, always send a vary header