From: Hank Grabowski Date: Sun, 26 Feb 2023 15:26:15 +0000 (-0500) Subject: Make calls inline and return 0 if value is null X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ea782d97fc07d48e4cc0e41b2e81649807b8e074;p=friendica.git Make calls inline and return 0 if value is null --- diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index c1065da454..db2f94d495 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -288,10 +288,7 @@ class Status extends BaseFactory $in_reply = []; } - $queue_count = $item['delivery_queue_count']; - $queue_done = $item['delivery_queue_done']; - $queue_failed = $item['delivery_queue_failed']; - $delivery_data = new FriendicaDeliveryData($queue_count, $queue_done, $queue_failed); + $delivery_data = new FriendicaDeliveryData($item['delivery_queue_count'] ?? 0, $item['delivery_queue_done'] ?? 0, $item['delivery_queue_failed'] ?? 0); $friendica = new FriendicaExtension($item['title'], $counts->dislikes, $delivery_data); return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica, $quote, $poll);