From b659c3e2424a5602808cf3d48f4044a3975c9dd2 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Wed, 22 Apr 2009 02:48:01 -0400 Subject: [PATCH] - fix 1px rectangle fill when mailbox is empty (used=0) --- bin/quotaimg.php | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/bin/quotaimg.php b/bin/quotaimg.php index 31f5cd6..fc3997a 100644 --- a/bin/quotaimg.php +++ b/bin/quotaimg.php @@ -172,7 +172,8 @@ } $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; -- Gitblit v1.9.1