From: Brion Vibber Date: Fri, 22 Oct 2010 18:07:19 +0000 (-0700) Subject: RegisterThrottlePlugin tweak for silencing checks: make sure we don't crash during... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6841a8d09389e6ce0612b63ce831d149e559d254;p=quix0rs-gnu-social.git 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 --- diff --git a/plugins/RegisterThrottle/RegisterThrottlePlugin.php b/plugins/RegisterThrottle/RegisterThrottlePlugin.php index 369426d337..7e2dde80fa 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.")); } }