Don't try to extract info from the titles until *after* we check that they are not...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Apr 2004 02:14:54 +0000 (02:14 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 29 Apr 2004 02:14:54 +0000 (02:14 +0000)
includes/Title.php

index cd91d19..2e36078 100644 (file)
@@ -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";
                }