Check for reply existence before using its values in Model\Mail

- Address https://github.com/friendica/friendica/issues/10474#issuecomment-925263894
pull/10764/head
Hypolite Petovan 2021-09-25 20:45:53 -04:00
rodzic 9d77958247
commit 0bb169b4ed
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -74,9 +74,7 @@ class Mail
return false; return false;
} }
if ($msg['reply']) { if ($msg['reply'] && DBA::isResult($reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]))) {
$reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]);
$msg['thr-parent'] = $reply['uri']; $msg['thr-parent'] = $reply['uri'];
$msg['thr-parent-id'] = $reply['uri-id']; $msg['thr-parent-id'] = $reply['uri-id'];
} else { } else {