RegisterThrottlePlugin tweak for silencing checks: make sure we don't crash during registration if another profile registered from this address has been since deleted.

Followup to commit 1caa08429f
This commit is contained in:
Brion Vibber 2010-10-22 11:07:19 -07:00
parent 1caa08429f
commit 6841a8d093
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ class RegisterThrottlePlugin extends Plugin
$ids = Registration_ip::usersByIP($ipaddress);
foreach ($ids as $id) {
$profile = Profile::staticGet('id', $id);
if ($profile->isSilenced()) {
if ($profile && $profile->isSilenced()) {
throw new Exception(_("A banned user has registered from this address."));
}
}