Merge "Make WikiMap fall back to sites if a site couldn't be found using $wgConf"
[lhc/web/wiklou.git] / includes / specials / SpecialChangePassword.php
index 168095f..6a4347d 100644 (file)
@@ -179,7 +179,8 @@ class SpecialChangePassword extends FormSpecialPage {
                }
 
                if ( $request->getCheck( 'wpCancel' ) ) {
-                       $titleObj = Title::newFromText( $request->getVal( 'returnto' ) );
+                       $returnto = $request->getVal( 'returnto' );
+                       $titleObj = $returnto !== null ? Title::newFromText( $returnto ) : null;
                        if ( !$titleObj instanceof Title ) {
                                $titleObj = Title::newMainPage();
                        }