X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fauth%2FAuthManager.php;h=d88a5b27e2ff5ee939969bd099291ad7102f402c;hb=c6adf0408cee1c0be97c222aa2689ec5800a84a4;hp=e223e16e69a1d52154daed31e8b337f4bf88928e;hpb=320e4c56132681f811c2819e3e22e98715f46ae7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/auth/AuthManager.php b/includes/auth/AuthManager.php index e223e16e69..d88a5b27e2 100644 --- a/includes/auth/AuthManager.php +++ b/includes/auth/AuthManager.php @@ -1678,7 +1678,7 @@ class AuthManager implements LoggerAwareInterface { // Ignore warnings about master connections/writes...hard to avoid here $trxProfiler = \Profiler::instance()->getTransactionProfiler(); - $trxProfiler->setSilenced( true ); + $old = $trxProfiler->setSilenced( true ); try { $status = $user->addToDatabase(); if ( !$status->isOK() ) { @@ -1704,7 +1704,7 @@ class AuthManager implements LoggerAwareInterface { return $status; } } catch ( \Exception $ex ) { - $trxProfiler->setSilenced( false ); + $trxProfiler->setSilenced( $old ); $this->logger->error( __METHOD__ . ': {username} failed with exception {exception}', [ 'username' => $username, 'exception' => $ex, @@ -1743,7 +1743,7 @@ class AuthManager implements LoggerAwareInterface { $logEntry->insert(); } - $trxProfiler->setSilenced( false ); + $trxProfiler->setSilenced( $old ); if ( $login ) { $this->setSessionDataForUser( $user ); @@ -2382,7 +2382,7 @@ class AuthManager implements LoggerAwareInterface { $session->set( 'AuthManager:lastAuthTimestamp', time() ); $session->persist(); - \ScopedCallback::consume( $delay ); + \Wikimedia\ScopedCallback::consume( $delay ); \Hooks::run( 'UserLoggedIn', [ $user ] ); }