Stop using depreacted base_convert
[lhc/web/wiklou.git] / includes / session / SessionManager.php
index c65fa21..6c17de5 100644 (file)
@@ -499,10 +499,12 @@ final class SessionManager implements SessionManagerInterface {
                                                        'username' => $userName,
                                                ] );
                                } else {
-                                       $logger->error( __METHOD__ . ': failed with message ' . $status->getWikiText(),
+                                       $logger->error(
+                                               __METHOD__ . ': failed with message ' . $status->getWikiText( false, false, 'en' ),
                                                [
                                                        'username' => $userName,
-                                               ] );
+                                               ]
+                                       );
                                }
                                $user->setId( $id );
                                $user->loadFromId( User::READ_LATEST );
@@ -624,7 +626,7 @@ final class SessionManager implements SessionManagerInterface {
                        }
                        // @codeCoverageIgnoreEnd
                        foreach ( $this->allSessionBackends as $backend ) {
-                               $backend->save( true );
+                               $backend->shutdown();
                        }
                }
        }
@@ -1072,7 +1074,7 @@ final class SessionManager implements SessionManagerInterface {
         */
        public function generateSessionId() {
                do {
-                       $id = wfBaseConvert( \MWCryptRand::generateHex( 40 ), 16, 32, 32 );
+                       $id = \Wikimedia\base_convert( \MWCryptRand::generateHex( 40 ), 16, 32, 32 );
                        $key = wfMemcKey( 'MWSession', $id );
                } while ( isset( $this->allSessionIds[$id] ) || is_array( $this->store->get( $key ) ) );
                return $id;