]> git.mxchange.org Git - friendica.git/blobdiff - mod/message.php
Merge pull request #10228 from MrPetovan/bug/warnings
[friendica.git] / mod / message.php
index 22283d8e886733c40c80ebb5bf6193768a74850b..06542bbaf24708f507448f88f817cc9c6aa4c755 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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']);