]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
double-check profile
authorEvan Prodromou <evan@status.net>
Wed, 21 Mar 2012 17:05:02 +0000 (13:05 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 21 Mar 2012 17:05:02 +0000 (13:05 -0400)
classes/Notice.php

index 58ae75fa68809f4e83c0a48d552c590252a6185d..a7c678e1cf595186504734e865dd3fbab98bdef5 100644 (file)
@@ -2474,7 +2474,7 @@ class Notice extends Managed_DataObject
             $author = $this->getProfile();
 
             if ($author->hasRole(Profile_role::SILENCED)) {
-                if (!$profile->hasRole(Profile_role::MODERATOR)) {
+                if (empty($profile) || !$profile->hasRole(Profile_role::MODERATOR)) {
                     return true;
                 }
             }