aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-14 12:55:21 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-12-14 12:55:21 +0000
commit59aae4df786dd2c96eeab0c896870f6fb031cf82 (patch)
treedccd20da33c4b0725eb4cf8c60eae7e76a50ffcf /views
parentada8ca5814073acdf735d803a277af95a6bedf81 (diff)
downloadelgg-59aae4df786dd2c96eeab0c896870f6fb031cf82.tar.gz
elgg-59aae4df786dd2c96eeab0c896870f6fb031cf82.tar.bz2
fixes #1197 - no division by zero warning any longer
git-svn-id: http://code.elgg.org/elgg/trunk@3757 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/output/tagcloud.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php
index a41ec20c3..bb4600b47 100644
--- a/views/default/output/tagcloud.php
+++ b/views/default/output/tagcloud.php
@@ -40,7 +40,8 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
if (!empty($cloud)) {
$cloud .= ", ";
}
- $size = round((log($tag->total) / log($max)) * 100) + 30;
+ // protecting against division by zero warnings
+ $size = round((log($tag->total) / log($max + .0001)) * 100) + 30;
if ($size < 60) {
$size = 60;
}