https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a41c657
)
PM: skip messages from missing contacts
author
fabrixxm
<fabrix.xm@gmail.com>
Thu, 18 Mar 2021 13:11:32 +0000
(14:11 +0100)
committer
fabrixxm
<fabrix.xm@gmail.com>
Thu, 18 Mar 2021 13:11:32 +0000
(14:11 +0100)
avoid the White Page of Death if a private message (mail) is pointing
to a non existing contact.
mod/message.php
patch
|
blob
|
history
diff --git
a/mod/message.php
b/mod/message.php
index
22283d8
..
2b699da
100644
(file)
--- a/
mod/message.php
+++ b/
mod/message.php
@@
-451,6
+451,11
@@
function render_messages(array $msg, $t)
$body_e = $rr['body'];
$to_name_e = $rr['name'];
+ if (is_null($rr['url'])) {
+ // contact-id is pointing to a non existing contact
+ continue;
+ }
+
$contact = Contact::getByURL($rr['url'], false, ['thumb', 'addr', 'id', 'avatar']);
$from_photo = Contact::getThumb($contact, $rr['thumb'] ?: $rr['from-photo']);