diff options
author | alecpl <alec@alec.pl> | 2009-04-22 06:48:01 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2009-04-22 06:48:01 +0000 |
commit | b659c3e2424a5602808cf3d48f4044a3975c9dd2 (patch) | |
tree | 2d742659c1306ae6e74306091c6c862c5dd4e91c /bin/quotaimg.php | |
parent | ac9927c1ff3ab04175979a2b7a949d6887253e5c (diff) |
- fix 1px rectangle fill when mailbox is empty (used=0)
Diffstat (limited to 'bin/quotaimg.php')
-rw-r--r-- | bin/quotaimg.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/quotaimg.php b/bin/quotaimg.php index 31f5cd6f2..fc3997a39 100644 --- a/bin/quotaimg.php +++ b/bin/quotaimg.php @@ -172,7 +172,8 @@ function genQuota($used, $total, $width, $height) } $quota_width = $quota / 100 * $width; - imagefilledrectangle($im, $border, 0, $quota_width, $height-2*$border, $fill); + if ($quota_width) + imagefilledrectangle($im, $border, 0, $quota_width, $height-2*$border, $fill); $string = $quota . '%'; $mid = floor(($width-(strlen($string)*imagefontwidth($font)))/2)+1; |