yurik@svn.wikimedia.org wrote:
if ($wgUser->isBlocked()) {
$id = $wgUser->blockedBy();
$vals['blockedby'] = is_numeric($id) ? User::whoIs($id) : $id;
This seems a little weird here... From what I can see, User::blockedBy() should always return a user ID, never a name, so the is_numeric() check shouldn't be needed here.
Secondly, the check would get false results if it did return a name sometimes -- legitimate usernames might match is_numeric(), and you'd then load a different, wrong username.
-- brion vibber (brion @ wikimedia.org)