From e76c8457130af47c44bcbfc8cd1bc58ee1ac2a1d Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 29 Apr 2004 02:14:54 +0000 Subject: [PATCH] Don't try to extract info from the titles until *after* we check that they are not null --- includes/Title.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index cd91d19fba..2e36078229 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -762,14 +762,14 @@ class Title { # Returns true on success, message name on failure # auth indicates whether wgUser's permissions should be checked function moveTo( &$nt, $auth = true ) { - $fname = "Title::move"; - $oldid = $this->getArticleID(); - $newid = $nt->getArticleID(); - if( !$this or !$nt ) { return "badtitletext"; } + $fname = "Title::move"; + $oldid = $this->getArticleID(); + $newid = $nt->getArticleID(); + if ( strlen( $nt->getDBkey() ) < 1 ) { return "articleexists"; } -- 2.20.1