Merge pull request #6196 from annando/notices

Fixes a notice and wrong counting of nodes
This commit is contained in:
Hypolite Petovan 2018-11-24 08:21:23 -05:00 committed by GitHub
commit f001a830ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -664,13 +664,17 @@ function admin_page_federation(App $a)
} while (!empty($parts) && ((strlen($part) >= 40) || (strlen($part) <= 3)));
if (!empty($part)) {
$compacted[$part] += $v[$key]['total'];
if (empty($compacted[$part])) {
$compacted[$part] = $v[$key]['total'];
} else {
$compacted[$part] += $v[$key]['total'];
}
}
}
$v = [];
foreach ($compacted as $version => $total) {
$v[] = ['version' => $version, 'total' => $total];
foreach ($compacted as $version => $pl_total) {
$v[] = ['version' => $version, 'total' => $pl_total];
}
}