From 326b1c4ceae9d6b0080ed2b6b5dfadadbfa31339 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 10 Jul 2007 19:37:12 +0000 Subject: [PATCH] Fix regression caused by the namespace check on oldid override. Don't die if we don't have a valid title yet! --- includes/Wiki.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/Wiki.php b/includes/Wiki.php index 897a2d4258..31ecd89668 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -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 ) { -- 2.20.1