From: Tim Starling Date: Mon, 6 Dec 2010 15:07:12 +0000 (+0000) Subject: Fix fatal error when admin name is blank X-Git-Tag: 1.31.0-rc.0~33523 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=8cfac963c4650f92df5e95578ce0f26fc308cdd2;p=lhc%2Fweb%2Fwiklou.git Fix fatal error when admin name is blank --- diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index e5f0c09119..e13732a781 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -587,7 +587,7 @@ class WebInstaller_Name extends WebInstallerPage { $msg = false; $pwd = $this->getVar( '_AdminPassword' ); $user = User::newFromName( $cname ); - $valid = $user->getPasswordValidity( $pwd ); + $valid = $user && $user->getPasswordValidity( $pwd ); if ( strval( $pwd ) === '' ) { # $user->getPasswordValidity just checks for $wgMinimalPasswordLength. # This message is more specific and helpful.