From 8706d8d351e0a4bffc710d50ab95a1252e57cb13 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 21 Mar 2012 13:05:02 -0400 Subject: [PATCH] double-check profile --- classes/Notice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Notice.php b/classes/Notice.php index 58ae75fa68..a7c678e1cf 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -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; } } -- 2.39.5