(bug 13517) list=users threw fatal error when only invalid usernames are specified
This commit is contained in:
parent
a5ea181659
commit
91ea00eedc
1 changed files with 3 additions and 1 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue