From: Brion Vibber Date: Sun, 8 Aug 2004 01:30:39 +0000 (+0000) Subject: Page move fix: when checking for redirects, don't die if redirected title is invalid... X-Git-Tag: 1.5.0alpha1~2475 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=3334db3b6662fab28c7b0a4bdaa4f1b58585da23;p=lhc%2Fweb%2Fwiklou.git Page move fix: when checking for redirects, don't die if redirected title is invalid. Error reported by Looxix in #mediawiki --- diff --git a/includes/Title.php b/includes/Title.php index 9db099f261..67c8facda0 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1178,7 +1178,8 @@ class Title { # Does the redirect point to the source? if ( preg_match( "/\\[\\[\\s*([^\\]]*)]]/", $obj->cur_text, $m ) ) { $redirTitle = Title::newFromText( $m[1] ); - if ( 0 != strcmp( $redirTitle->getPrefixedDBkey(), $this->getPrefixedDBkey() ) ) { + if( !is_object( $redirTitle ) || + $redirTitle->getPrefixedDBkey() != $this->getPrefixedDBkey() ) { return false; } }