From: Reedy Date: Sat, 7 Apr 2012 19:05:22 +0000 (+0100) Subject: Title::moveToInternal doesn't return anything, but it does throw an exception X-Git-Tag: 1.31.0-rc.0~23566^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=9ae175d6c8be88ba59174deabbbae9ed4eb64fa7;p=lhc%2Fweb%2Fwiklou.git Title::moveToInternal doesn't return anything, but it does throw an exception Means the evaluation of if ( is_array( $err ) ) { is always going to be false Update the documentation Change-Id: I0016495563e715a2a1927e227ec2bb5c80b5378b --- diff --git a/includes/Title.php b/includes/Title.php index 769adb91f6..5d6a21e2d7 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3481,12 +3481,7 @@ class Title { $protected = $this->isProtected(); // Do the actual move - $err = $this->moveToInternal( $nt, $reason, $createRedirect ); - if ( is_array( $err ) ) { - # @todo FIXME: What about the File we have already moved? - $dbw->rollback( __METHOD__ ); - return $err; - } + $this->moveToInternal( $nt, $reason, $createRedirect ); // Refresh the sortkey for this row. Be careful to avoid resetting // cl_timestamp, which may disturb time-based lists on some sites. @@ -3562,6 +3557,7 @@ class Title { * @param $reason String The reason for the move * @param $createRedirect Bool Whether to leave a redirect at the old title. Ignored * if the user doesn't have the suppressredirect right + * @throws MWException */ private function moveToInternal( &$nt, $reason = '', $createRedirect = true ) { global $wgUser, $wgContLang;