From 6841a8d09389e6ce0612b63ce831d149e559d254 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 22 Oct 2010 11:07:19 -0700 Subject: 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 --- plugins/RegisterThrottle/RegisterThrottlePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.")); } } -- cgit v1.2.3-54-g00ecf