]> git.sur5r.net Git - contagged/blobdiff - tags.php
PHP5 notice cleanups
[contagged] / tags.php
index 740c0aae6b91a755ff3f4caeb5c96bc1e0a752e2..bd26632768980a60d296f070d20f45e91b52bbad 100644 (file)
--- a/tags.php
+++ b/tags.php
     $max = 0;
     $tags = array();
     foreach ($result as $entry){
-      if(count($entry['marker'])){
+      if(!empty($entry['marker']) && count($entry['marker'])){
         foreach($entry['marker'] as $marker){
           $marker = strtolower($marker);
+          if (empty($tags[$marker])) { $tags[$marker]=0; }
           $tags[$marker] += 1;
           if($tags[$marker] > $max) $max = $tags[$marker];
         }