Fix for r100114: make API and tests work again
[lhc/web/wiklou.git] / includes / api / ApiLogin.php
index 67e9409..b18954b 100644 (file)
@@ -68,7 +68,10 @@ class ApiLogin extends ApiBase {
                        wfSetupSession();
                }
 
-               $loginForm = new LoginForm( $req );
+               $context = $this->createContext();
+               $context->setRequest( $req );
+               $loginForm = new LoginForm();
+               $loginForm->setContext( $context );
 
                global $wgCookiePrefix, $wgUser, $wgPasswordAttemptThrottle;