]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
RegisterThrottlePlugin tweak for silencing checks: make sure we don't crash during...
authorBrion Vibber <brion@pobox.com>
Fri, 22 Oct 2010 18:07:19 +0000 (11:07 -0700)
committerBrion Vibber <brion@pobox.com>
Fri, 22 Oct 2010 18:07:19 +0000 (11:07 -0700)
Followup to commit 1caa08429f591b170da210d72f3501843f2bc657

plugins/RegisterThrottle/RegisterThrottlePlugin.php

index 369426d337cd9ef2da04fd7b176707ada014c86a..7e2dde80fa1f2d9cdb363aae7f97f800cc7c7ee4 100644 (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."));
                 }
             }