(bug 13517) list=users threw fatal error when only invalid usernames are specified

This commit is contained in:
Roan Kattouw 2008-03-26 18:08:58 +00:00
parent a5ea181659
commit 91ea00eedc

View file

@ -63,11 +63,13 @@ if (!defined('MEDIAWIKI')) {
// Canonicalize user names
foreach($users as $u) {
$n = User::getCanonicalName($u);
if($n === false)
if($n === false || $n === '')
$retval[] = array('name' => $u, 'invalid' => '');
else
$goodNames[] = $n;
}
if(empty($goodNames))
return $retval;
$db = $this->getDb();
$userTable = $db->tableName('user');