]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/Item.php
Merge pull request #8912 from annando/subscribed-tags
[friendica.git] / src / Model / Item.php
index 39fb3cb54c1b5aac8690afcef40edbfba19b7c8c..f7e7ae8737d0d7647f373a5ffd23deee9e381a5d 100644 (file)
@@ -2195,13 +2195,15 @@ class Item
                        $contact = Contact::getByURLForUser($item['author-link'], $uid, false, ['id']);
                }
 
-               if (!empty($item['contact-id'])) {
+               if (!empty($contact['id'])) {
                        $item['contact-id'] = $contact['id'];
                } else {
                        // Shouldn't happen at all
+                       Logger::warning('contact-id could not be fetched', ['uid' => $uid, 'item' => $item]);
                        $self = DBA::selectFirst('contact', ['id'], ['self' => true, 'uid' => $uid]);
                        if (!DBA::isResult($self)) {
                                // Shouldn't happen even less
+                               Logger::warning('self contact could not be fetched', ['uid' => $uid, 'item' => $item]);
                                return 0;
                        }
                        $item['contact-id'] = $self['id'];