]> git.mxchange.org Git - friendica.git/blobdiff - src/Worker/APDelivery.php
Merge pull request #9327 from nupplaphil/task/security_restructure
[friendica.git] / src / Worker / APDelivery.php
index 609bb88886632b128eac4282db661eaabd9fa6e6..92767a10589b2fa5d020e1fc89eff353d257b65c 100644 (file)
@@ -68,13 +68,14 @@ class APDelivery
                        }
                }
 
-               // This should never fail and is temporariy (until the move to )
+               // This should never fail and is temporariy (until the move to the "post" structure)
                $item = Item::selectFirst(['uri-id'], ['id' => $target_id]);
+               $uriid = $item['uri-id'] ?? 0;
 
                if (!$success && !Worker::defer() && in_array($cmd, [Delivery::POST])) {
-                       Post\DeliveryData::incrementQueueFailed($item['uri-id']);
+                       Post\DeliveryData::incrementQueueFailed($uriid);
                } elseif ($success && in_array($cmd, [Delivery::POST])) {
-                       Post\DeliveryData::incrementQueueDone($item['uri-id'], Post\DeliveryData::ACTIVITYPUB);
+                       Post\DeliveryData::incrementQueueDone($uriid, Post\DeliveryData::ACTIVITYPUB);
                }
        }
 }