Merge commit 'refs/merge-requests/199' of git://gitorious.org/statusnet/mainline into statusnet-merge-requests/199

This commit is contained in:
Mikael Nordfeldth 2014-03-31 13:09:11 +02:00
commit 220b51d8be

View File

@ -398,7 +398,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);