r77882 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77881‎ | r77882 | r77883 >
Date:15:07, 6 December 2010
Author:tstarling
Status:ok
Tags:
Comment:
Fix fatal error when admin name is blank
Modified paths:
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -587,7 +587,7 @@
588588 $msg = false;
589589 $pwd = $this->getVar( '_AdminPassword' );
590590 $user = User::newFromName( $cname );
591 - $valid = $user->getPasswordValidity( $pwd );
 591+ $valid = $user && $user->getPasswordValidity( $pwd );
592592 if ( strval( $pwd ) === '' ) {
593593 # $user->getPasswordValidity just checks for $wgMinimalPasswordLength.
594594 # This message is more specific and helpful.

Status & tagging log