Added logging
This commit is contained in:
parent
186bc46721
commit
e2826a98d3
|
@ -2199,9 +2199,11 @@ class Item
|
||||||
$item['contact-id'] = $contact['id'];
|
$item['contact-id'] = $contact['id'];
|
||||||
} else {
|
} else {
|
||||||
// Shouldn't happen at all
|
// 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]);
|
$self = DBA::selectFirst('contact', ['id'], ['self' => true, 'uid' => $uid]);
|
||||||
if (!DBA::isResult($self)) {
|
if (!DBA::isResult($self)) {
|
||||||
// Shouldn't happen even less
|
// Shouldn't happen even less
|
||||||
|
Logger::warning('self contact could not be fetched', ['uid' => $uid, 'item' => $item]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$item['contact-id'] = $self['id'];
|
$item['contact-id'] = $self['id'];
|
||||||
|
|
Loading…
Reference in a new issue