diff --git a/web/lib/ght.php b/web/lib/ght.php index 0d7a5f7..df3dc09 100644 --- a/web/lib/ght.php +++ b/web/lib/ght.php @@ -70,7 +70,8 @@ $ozero is whether to include a zero value for a unit if ($buniti>=1) { if ($out!='') $osep=$sep; $x=round($ts,$sd); - ($x==1) ? $out.=$osep.$x.' '.$fa[$i] : $out.=$osep.$x.' '.$fa[$i+1]; + if ($x>0 || $ozero || $out=='') + ($x==1) ? $out.=$osep.$x.' '.$fa[$i] : $out.=$osep.$x.' '.$fa[$i+1]; } return $out; }