Title::moveToInternal doesn't return anything, but it does throw an exception
authorReedy <reedy@wikimedia.org>
Sat, 7 Apr 2012 19:05:22 +0000 (20:05 +0100)
committerReedy <reedy@wikimedia.org>
Wed, 11 Apr 2012 19:00:29 +0000 (20:00 +0100)
Means the evaluation of if ( is_array( $err ) ) { is always going to be false

Update the documentation

Change-Id: I0016495563e715a2a1927e227ec2bb5c80b5378b

includes/Title.php

index 769adb9..5d6a21e 100644 (file)
@@ -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;