From: WMDE-Fisch Date: Tue, 30 Apr 2019 14:37:03 +0000 (+0200) Subject: Remove superfluous cast to int X-Git-Tag: 1.34.0-rc.0~1784^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin//%22%24encUrl/%22?a=commitdiff_plain;h=5af56eb193cf9c27aae81167bbf0c7a883dba489;p=lhc%2Fweb%2Fwiklou.git Remove superfluous cast to int The return type from User:idFromName should now always be an int or null. Change-Id: Id89ada740a89d7958548673ad91397e18757bbc5 Depends-On: I3085d89b93db2b888c190ba193623b86dc93759a --- diff --git a/maintenance/cleanupUsersWithNoId.php b/maintenance/cleanupUsersWithNoId.php index 61d1e5d5ab..f7fd9d5260 100644 --- a/maintenance/cleanupUsersWithNoId.php +++ b/maintenance/cleanupUsersWithNoId.php @@ -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 ); } } }