summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-10-22 11:07:19 -0700
committerBrion Vibber <brion@pobox.com>2010-10-22 11:07:19 -0700
commit6841a8d09389e6ce0612b63ce831d149e559d254 (patch)
treeae52d5fe6eea5f545a01194e34ff95d7785c7833
parent1caa08429f591b170da210d72f3501843f2bc657 (diff)
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 1caa08429f591b170da210d72f3501843f2bc657
-rw-r--r--plugins/RegisterThrottle/RegisterThrottlePlugin.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/RegisterThrottle/RegisterThrottlePlugin.php b/plugins/RegisterThrottle/RegisterThrottlePlugin.php
index 369426d33..7e2dde80f 100644
--- a/plugins/RegisterThrottle/RegisterThrottlePlugin.php
+++ b/plugins/RegisterThrottle/RegisterThrottlePlugin.php
@@ -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."));
}
}