From e4085087f13852412f0b97b5c3d2178796c0de7a Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 27 Jan 2012 15:32:13 -0500 Subject: [PATCH] non-existent poco --- plugins/Blacklist/BlacklistPlugin.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/plugins/Blacklist/BlacklistPlugin.php b/plugins/Blacklist/BlacklistPlugin.php index babf703131..33d0bf430b 100644 --- a/plugins/Blacklist/BlacklistPlugin.php +++ b/plugins/Blacklist/BlacklistPlugin.php @@ -505,14 +505,16 @@ class BlacklistPlugin extends Plugin } } - $nickname = strtolower($actor->poco->preferredUsername); + 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); + 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); + } } }