From: Hypolite Petovan Date: Thu, 26 Jan 2023 03:11:22 +0000 (-0500) Subject: Cast key values to int in Mastodon\Stats X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0259af1118841873e7da339c3a0cd7b1cfa4d4fe;p=friendica.git Cast key values to int in Mastodon\Stats - Address https://sekretaerbaer.de/display/61b27817-3763-cd4c-5fca-b4d397968464 --- diff --git a/src/Object/Api/Mastodon/Stats.php b/src/Object/Api/Mastodon/Stats.php index 335c82d431..c38ba33f65 100644 --- a/src/Object/Api/Mastodon/Stats.php +++ b/src/Object/Api/Mastodon/Stats.php @@ -45,7 +45,7 @@ class Stats extends BaseDataTransferObject { if (!empty($config->get('system', 'nodeinfo'))) { $this->user_count = intval(DI::keyValue()->get('nodeinfo_total_users')); - $this->status_count = DI::keyValue()->get('nodeinfo_local_posts') + DI::keyValue()->get('nodeinfo_local_comments'); + $this->status_count = (int)DI::keyValue()->get('nodeinfo_local_posts') + (int)DI::keyValue()->get('nodeinfo_local_comments'); $this->domain_count = $database->count('gserver', ["`network` in (?, ?) AND NOT `failed` AND NOT `blocked`", Protocol::DFRN, Protocol::ACTIVITYPUB]); } }