summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/tag/helpers/tag.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/tag/helpers/tag.php b/modules/tag/helpers/tag.php
index d895e08f..c49a2d0f 100644
--- a/modules/tag/helpers/tag.php
+++ b/modules/tag/helpers/tag.php
@@ -73,6 +73,9 @@ class tag_Core {
if ($tags) {
$cloud = new View("tag_cloud.html");
$cloud->max_count = $tags[0]->count;
+ if (!$cloud->max_count) {
+ return;
+ }
usort($tags, array("tag", "sort_by_name"));
$cloud->tags = $tags;
return $cloud;