]> git.mxchange.org Git - friendica.git/commitdiff
Fixes a notice and wrong counting of nodes
authorMichael <heluecht@pirati.ca>
Sat, 24 Nov 2018 11:38:36 +0000 (11:38 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 24 Nov 2018 11:38:36 +0000 (11:38 +0000)
mod/admin.php

index cca109f48a4fa886f51997eb661b1561d905a260..5bf55423e5768a94ba3ae8cddf41d945aa6e803b 100644 (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];
                        }
                }