From b659c3e2424a5602808cf3d48f4044a3975c9dd2 Mon Sep 17 00:00:00 2001 From: alecpl Date: Wed, 22 Apr 2009 06:48:01 +0000 Subject: - fix 1px rectangle fill when mailbox is empty (used=0) --- bin/quotaimg.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin') 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; -- cgit v1.2.3