From: Thorsten Date: Sat, 19 Nov 2022 15:48:07 +0000 (+0100) Subject: Fix that user property should be an object instead of array. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=877369d964ca74fd96e65731ee5fcdf9ac4adbb4;p=friendica.git Fix that user property should be an object instead of array. --- diff --git a/src/Model/Nodeinfo.php b/src/Model/Nodeinfo.php index b10572612d..93b3b5b2da 100644 --- a/src/Model/Nodeinfo.php +++ b/src/Model/Nodeinfo.php @@ -80,19 +80,17 @@ class Nodeinfo $config = DI::config(); $usage = new stdClass(); - $usage->users = []; + $usage->users = new \stdClass; if (!empty($config->get('system', 'nodeinfo'))) { - $usage->users = [ - 'total' => intval($config->get('nodeinfo', 'total_users')), - 'activeHalfyear' => intval($config->get('nodeinfo', 'active_users_halfyear')), - 'activeMonth' => intval($config->get('nodeinfo', 'active_users_monthly')) - ]; + $usage->users->total = intval($config->get('nodeinfo', 'total_users')); + $usage->users->activeHalfyear = intval($config->get('nodeinfo', 'active_users_halfyear')); + $usage->users->activeMonth = intval($config->get('nodeinfo', 'active_users_monthly')); $usage->localPosts = intval($config->get('nodeinfo', 'local_posts')); $usage->localComments = intval($config->get('nodeinfo', 'local_comments')); if ($version2) { - $usage->users['activeWeek'] = intval($config->get('nodeinfo', 'active_users_weekly')); + $usage->users->activeWeek = intval($config->get('nodeinfo', 'active_users_weekly')); } }