r64251 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r64250‎ | r64251 | r64252 >
Date:13:32, 27 March 2010
Author:demon
Status:resolved
Tags:
Comment:
Put try/catch around setPassword() just in case
Modified paths:
  • /branches/new-installer/phase3/includes/installer/WebInstaller.php (modified) (history)

Diff [purge]

Index: branches/new-installer/phase3/includes/installer/WebInstaller.php
@@ -1580,7 +1580,11 @@
15811581 }
15821582 if ( $user->idForName() == 0 ) {
15831583 $user->addToDatabase();
1584 - $user->setPassword( $this->getVar( '_AdminPassword' ) );
 1584+ try {
 1585+ $user->setPassword( $this->getVar( '_AdminPassword' ) );
 1586+ } catch( PasswordError $pwe ) {
 1587+ // need better failure here!
 1588+ }
15851589 $user->saveSettings();
15861590 $user->addGroup( 'sysop' );
15871591 $user->addGroup( 'bureaucrat' );

Status & tagging log