From 9ae175d6c8be88ba59174deabbbae9ed4eb64fa7 Mon Sep 17 00:00:00 2001 From: Reedy Date: Sat, 7 Apr 2012 20:05:22 +0100 Subject: [PATCH] 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 --- includes/Title.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; -- 2.20.1