From 49ec5e5e6e94a9bf7569ea76887ed79cd186b21c Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 3 May 2022 08:20:48 +0000 Subject: [PATCH] Check for empty value --- src/Worker/APDelivery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Worker/APDelivery.php b/src/Worker/APDelivery.php index 370e3713ca..37b47dd46d 100644 --- a/src/Worker/APDelivery.php +++ b/src/Worker/APDelivery.php @@ -68,7 +68,7 @@ class APDelivery } if (!$success && !Worker::defer() && in_array($cmd, [Delivery::POST])) { - if ($uri_id) { + if (!empty($uri_id)) { Post\Delivery::remove($uri_id, $inbox); Post\DeliveryData::incrementQueueFailed($uri_id); } elseif (!empty($uri_ids)) { @@ -78,7 +78,7 @@ class APDelivery } } } elseif ($success && in_array($cmd, [Delivery::POST])) { - if ($uri_id) { + if (!empty($uri_id)) { Post\DeliveryData::incrementQueueDone($uri_id, Post\DeliveryData::ACTIVITYPUB); } elseif (!empty($uri_ids)) { foreach ($uri_ids as $uri_id) {