From 9f91cc01de8933361ca9e397fe87949af0a83a6b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20H=C3=BClsmann?= Date: Thu, 26 Jul 2012 13:10:20 +0200 Subject: [PATCH] fixed fatal error when a QnA question is deleted but its notice still exists --- plugins/QnA/QnAPlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/QnA/QnAPlugin.php b/plugins/QnA/QnAPlugin.php index 4908e93dd0..9ab30d1aad 100644 --- a/plugins/QnA/QnAPlugin.php +++ b/plugins/QnA/QnAPlugin.php @@ -436,7 +436,7 @@ class QnAPlugin extends MicroAppPlugin $user = common_current_user(); $question = QnA_Question::getByNotice($notice); - if (!empty($user)) { + if (!empty($user) and !empty($question)) { $profile = $user->getProfile(); $answer = $question->getAnswer($profile); -- 2.39.5