]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fixed fatal error when a QnA question is deleted but its notice still exists
authorFlorian Hülsmann <fh@cbix.de>
Thu, 26 Jul 2012 11:10:20 +0000 (13:10 +0200)
committerFlorian Hülsmann <fh@cbix.de>
Thu, 26 Jul 2012 11:10:20 +0000 (13:10 +0200)
plugins/QnA/QnAPlugin.php

index 4908e93dd0e250caa7326e4911b2a67fcb937d92..9ab30d1aad2d223c6007b4e8dea566c3bb92386b 100644 (file)
@@ -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);