Added logging
This commit is contained in:
parent
186bc46721
commit
e2826a98d3
1 changed files with 2 additions and 0 deletions
|
@ -2199,9 +2199,11 @@ class Item
|
|||
$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'];
|
||||
|
|
Loading…
Reference in a new issue