And some more notices removed ... (#5533)

* Fix for vanishing notes

* The field needs to be part of the selected fields ...

* And some more notes ...
This commit is contained in:
Michael Vogel 2018-07-31 07:54:25 +02:00 committed by Tobias Diekershoff
parent 2c0ad47dfc
commit b552b711ee
4 changed files with 25 additions and 7 deletions

View file

@ -59,7 +59,7 @@ class Delivery extends BaseObject
}
$parent_id = intval($item['parent']);
$condition = ['id' => [$item_id, $parent_id], 'visible' => true, 'moderated' => false];
$condition = ['id' => [$item_id, $parent_id], 'moderated' => false];
$params = ['order' => ['id']];
$itemdata = Item::select([], $condition, $params);
@ -75,6 +75,16 @@ class Delivery extends BaseObject
}
DBA::close($itemdata);
if (empty($target_item)) {
logger('Item ' . $item_id . "wasn't found. Quitting here.");
return;
}
if (empty($parent)) {
logger('Parent ' . $parent_id . ' for item ' . $item_id . "wasn't found. Quitting here.");
return;
}
$uid = $target_item['contact-uid'];
// avoid race condition with deleting entries