X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FNotifier.php;h=6c3717200bbfdd324197c4ef8f8b1e8f9cc87d8f;hb=a41e49c84a3b799f4c511719516a7fbb9db9694f;hp=61b296a26543a2b3c7d40c41f33255a3db876505;hpb=f828350ba215e7ba724b0310f76f50885b111778;p=friendica.git diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 61b296a265..6c3717200b 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -124,7 +124,7 @@ class Notifier { return; } - $items = dba::inArray($ret); + $items = Item::inArray($ret); // avoid race condition with deleting entries if ($items[0]['deleted']) { @@ -167,7 +167,7 @@ class Notifier { $fields = ['network', 'author-id', 'owner-id']; $condition = ['uri' => $target_item["thr-parent"], 'uid' => $target_item["uid"]]; - $thr_parent = dba::selectFirst('item', $fields, $condition); + $thr_parent = Item::selectFirst($fields, $condition); logger('GUID: '.$target_item["guid"].': Parent is '.$parent['network'].'. Thread parent is '.$thr_parent['network'], LOGGER_DEBUG); @@ -378,7 +378,7 @@ class Notifier { } // If this is a public message and pubmail is set on the parent, include all your email contacts - if (function_exists('imap_open') && !Config::get('system','imap_disabled')) { + if (!empty($target_item) && function_exists('imap_open') && !Config::get('system','imap_disabled')) { if (!strlen($target_item['allow_cid']) && !strlen($target_item['allow_gid']) && !strlen($target_item['deny_cid']) && !strlen($target_item['deny_gid']) && intval($target_item['pubmail'])) { @@ -412,7 +412,7 @@ class Notifier { // delivery loop if (DBM::is_result($r)) { foreach ($r as $contact) { - logger("Deliver ".$target_item["guid"]." to ".$contact['url']." via network ".$contact['network'], LOGGER_DEBUG); + logger("Deliver ".$item_id." to ".$contact['url']." via network ".$contact['network'], LOGGER_DEBUG); Worker::add(['priority' => $a->queue['priority'], 'created' => $a->queue['created'], 'dont_fork' => true], 'Delivery', $cmd, $item_id, (int)$contact['id']);