Fix bug in CSSJanus where background-position and background-position-x weren't flipp...
[lhc/web/wiklou.git] / maintenance / reassignEdits.php
index 039422b..3830fe3 100644 (file)
@@ -126,8 +126,8 @@ class ReassignEdits extends Maintenance {
         * i.e. a user => id mapping, or a user_text => text mapping
         *
         * @param $user User for the condition
-        * @param $idfield Field name containing the identifier
-        * @param $utfield Field name containing the user text
+        * @param $idfield string Field name containing the identifier
+        * @param $utfield string Field name containing the user text
         * @return array
         */
        private function userConditions( &$user, $idfield, $utfield ) {
@@ -139,8 +139,8 @@ class ReassignEdits extends Maintenance {
         * i.e. user => id, user_text => text
         *
         * @param $user User for the spec
-        * @param $idfield Field name containing the identifier
-        * @param $utfield Field name containing the user text
+        * @param $idfield string Field name containing the identifier
+        * @param $utfield string Field name containing the user text
         * @return array
         */
        private function userSpecification( &$user, $idfield, $utfield ) {
@@ -160,6 +160,9 @@ class ReassignEdits extends Maintenance {
                        $user->setName( $username );
                } else {
                        $user = User::newFromName( $username );
+                       if ( !$user ) {
+                               $this->error( "Invalid username", true );
+                       }
                }
                $user->load();
                return $user;