]> git.mxchange.org Git - friendica.git/commitdiff
Cast key values to int in Mastodon\Stats
authorHypolite Petovan <hypolite@mrpetovan.com>
Thu, 26 Jan 2023 03:11:22 +0000 (22:11 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Thu, 26 Jan 2023 03:11:22 +0000 (22:11 -0500)
- Address https://sekretaerbaer.de/display/61b27817-3763-cd4c-5fca-b4d397968464

src/Object/Api/Mastodon/Stats.php

index 335c82d43176f3f23756b66651cd09f11f218e8f..c38ba33f658307a2f8f52bafed3c44482a3e35f9 100644 (file)
@@ -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]);
                }
        }