From: Brion Vibber Date: Thu, 29 Apr 2004 02:14:54 +0000 (+0000) Subject: Don't try to extract info from the titles until *after* we check that they are not... X-Git-Tag: 1.3.0beta1~204 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=e76c8457130af47c44bcbfc8cd1bc58ee1ac2a1d;p=lhc%2Fweb%2Fwiklou.git Don't try to extract info from the titles until *after* we check that they are not null --- 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"; }