]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #2967 from Hypolite/issue/#2955
authorMichael Vogel <icarus@dabo.de>
Tue, 22 Nov 2016 20:00:34 +0000 (21:00 +0100)
committerGitHub <noreply@github.com>
Tue, 22 Nov 2016 20:00:34 +0000 (21:00 +0100)
ping.php: Prevent $register_count from being undefined

1  2 
mod/ping.php

diff --combined mod/ping.php
index 60b5017b48dc6c2eac8801a1dcbb20e55edc2b4f,81a07a3d889ac5c84000f73978b52f2e1f5a87ab..6f612303fb0ba9cceed3c26875af867106437790
@@@ -50,6 -50,7 +50,7 @@@ function ping_init(&$a) 
  
                $home_count = 0;
                $network_count = 0;
+               $register_count = 0;
                $groups_unseen = array();
                $forums_unseen = array();
  
@@@ -83,7 -84,7 +84,7 @@@
                                // Find out how unseen network posts are spread across groups
                                $group_counts = groups_count_unseen();
                                if (dbm::is_result($group_counts)) {
 -                                      foreach ($groups_counts as $group_count) {
 +                                      foreach ($group_counts as $group_count) {
                                                if ($group_count['count'] > 0) {
                                                        $groups_unseen[] = $group_count;
                                                }
                        if ($regs) {
                                $register_count = $regs[0]['total'];
                        }
-               } else {
-                       $register_count = 0;
                }
  
                $all_events = 0;