]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
non-existent poco
authorEvan Prodromou <evan@status.net>
Fri, 27 Jan 2012 20:32:13 +0000 (15:32 -0500)
committerEvan Prodromou <evan@status.net>
Fri, 27 Jan 2012 20:32:13 +0000 (15:32 -0500)
plugins/Blacklist/BlacklistPlugin.php

index babf7031313e22565e0a0b366a009940834e585d..33d0bf430b7b2ecad59de85ac72d5bb90c5f689c 100644 (file)
@@ -505,14 +505,16 @@ class BlacklistPlugin extends Plugin
             }
         }
 
-        $nickname = strtolower($actor->poco->preferredUsername);
-
-        if (!empty($nickname)) {
-            if (!$this->_checkNickname($nickname)) {
-                // TRANS: Exception thrown trying to post a notice while having a blocked nickname. %s is the blocked nickname.
-                $msg = sprintf(_m("Notices from nickname \"%s\" disallowed."),
-                               $nickname);
-                throw new ClientException($msg);
+        if (!empty($actor->poco)) {
+            $nickname = strtolower($actor->poco->preferredUsername);
+
+            if (!empty($nickname)) {
+                if (!$this->_checkNickname($nickname)) {
+                    // TRANS: Exception thrown trying to post a notice while having a blocked nickname. %s is the blocked nickname.
+                    $msg = sprintf(_m("Notices from nickname \"%s\" disallowed."),
+                                   $nickname);
+                    throw new ClientException($msg);
+                }
             }
         }