]> git.mxchange.org Git - friendica.git/commitdiff
Fix notice in Worker\Delivery
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 16 Oct 2018 22:26:43 +0000 (18:26 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 16 Oct 2018 22:26:43 +0000 (18:26 -0400)
src/Worker/Delivery.php

index f2951cce1ff2bf13deb7aec6e112f16bfcb655f8..1c353fb6327e8da4e3621e8344f7eaea51bb96d1 100644 (file)
@@ -39,13 +39,13 @@ class Delivery extends BaseObject
                $followup = false;
                $public_message = false;
 
+               $items = [];
                if ($cmd == self::MAIL) {
                        $target_item = DBA::selectFirst('mail', [], ['id' => $item_id]);
                        if (!DBA::isResult($target_item)) {
                                return;
                        }
                        $uid = $target_item['uid'];
-                       $items = [];
                } elseif ($cmd == self::SUGGESTION) {
                        $target_item = DBA::selectFirst('fsuggest', [], ['id' => $item_id]);
                        if (!DBA::isResult($target_item)) {
@@ -65,7 +65,6 @@ class Delivery extends BaseObject
                        $params = ['order' => ['id']];
                        $itemdata = Item::select([], $condition, $params);
 
-                       $items = [];
                        while ($item = Item::fetch($itemdata)) {
                                if ($item['id'] == $parent_id) {
                                        $parent = $item;