X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupUsersWithNoId.php;h=f7fd9d52609e8235a8e384feca5ca65f4060dee0;hb=a9164f143a59a8d957a1d7f205715ac57fff3c8c;hp=3763d3b1c191887ab211431086c240a1631aa8a2;hpb=16ef3e79c4c52aa6b74563b7eadcfc9792e7a4c4;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupUsersWithNoId.php b/maintenance/cleanupUsersWithNoId.php index 3763d3b1c1..f7fd9d5260 100644 --- a/maintenance/cleanupUsersWithNoId.php +++ b/maintenance/cleanupUsersWithNoId.php @@ -95,7 +95,7 @@ class CleanupUsersWithNoId extends LoggedUpdateMaintenance { * @param IDatabase $dbw * @param string[] $indexFields Fields in the index being ordered by * @param object $row Database row - * @return array [ string $next, string $display ] + * @return string[] [ string $next, string $display ] */ private function makeNextCond( $dbw, $indexFields, $row ) { $next = ''; @@ -110,7 +110,7 @@ class CleanupUsersWithNoId extends LoggedUpdateMaintenance { $next = "$field > $value OR $field = $value AND ($next)"; } } - $display = join( ' ', array_reverse( $display ) ); + $display = implode( ' ', array_reverse( $display ) ); return [ $next, $display ]; } @@ -166,13 +166,13 @@ class CleanupUsersWithNoId extends LoggedUpdateMaintenance { $id = 0; if ( $this->assign ) { - $id = (int)User::idFromName( $name ); + $id = User::idFromName( $name ); if ( !$id ) { // See if any extension wants to create it. if ( !isset( $this->triedCreations[$name] ) ) { $this->triedCreations[$name] = true; if ( !Hooks::run( 'ImportHandleUnknownUser', [ $name ] ) ) { - $id = (int)User::idFromName( $name, User::READ_LATEST ); + $id = User::idFromName( $name, User::READ_LATEST ); } } }