diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/publictagcloud.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php index e7f6ee36c..5c7074029 100644 --- a/actions/publictagcloud.php +++ b/actions/publictagcloud.php @@ -136,7 +136,12 @@ class PublictagcloudAction extends Action $this->elementStart('dd'); $this->elementStart('ul', 'tags xoxo tag-cloud'); foreach ($tw as $tag => $weight) { - $this->showTag($tag, $weight, $weight/$sum); + if ($sum) { + $weightedSum = $weight/$sum; + } else { + $weightedSum = 1; + } + $this->showTag($tag, $weight, $weightedSum); } $this->elementEnd('ul'); $this->elementEnd('dd'); |