forked from GNUsocial/gnu-social
fixed fatal error when a QnA question is deleted but its notice still exists
This commit is contained in:
parent
3ad77e8bb2
commit
9f91cc01de
@ -436,7 +436,7 @@ class QnAPlugin extends MicroAppPlugin
|
|||||||
$user = common_current_user();
|
$user = common_current_user();
|
||||||
$question = QnA_Question::getByNotice($notice);
|
$question = QnA_Question::getByNotice($notice);
|
||||||
|
|
||||||
if (!empty($user)) {
|
if (!empty($user) and !empty($question)) {
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
$answer = $question->getAnswer($profile);
|
$answer = $question->getAnswer($profile);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user