From: Florian Hülsmann Date: Thu, 26 Jul 2012 11:10:20 +0000 (+0200) Subject: fixed fatal error when a QnA question is deleted but its notice still exists X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9f91cc01de8933361ca9e397fe87949af0a83a6b;p=quix0rs-gnu-social.git fixed fatal error when a QnA question is deleted but its notice still exists --- 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);