Fix regression caused by the namespace check on oldid override.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 10 Jul 2007 19:37:12 +0000 (19:37 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 10 Jul 2007 19:37:12 +0000 (19:37 +0000)
Don't die if we don't have a valid title yet!

includes/Wiki.php

index 897a2d4..31ecd89 100644 (file)
@@ -102,7 +102,8 @@ class MediaWiki {
                                $lang->findVariantLink( $title, $ret );
 
                }
-               if ( $ret->getNamespace() != NS_SPECIAL && $oldid = $request->getInt( 'oldid' ) ) {
+               if ( $oldid = $request->getInt( 'oldid' )
+                       && ( is_null( $ret ) || $ret->getNamespace() != NS_SPECIAL ) ) {
                        // Allow oldid to override a changed or missing title.
                        $rev = Revision::newFromId( $oldid );
                        if( $rev ) {