| # | Line 109 | Line 109 | function showBar($title, $value, $max, $units, $input, | |
|---|---|---|
| 109 | if (!is_int($max)) { | |
| 110 | $max = getPregMatch($max, $input); | |
| 111 | } | |
| 112 | < | if (!isset($value) || empty($max)) { |
| 112 | > | if (!isset($value) || !isset($max)) { |
| 113 | return; | |
| 114 | } | |
| 115 | ||
| # | Line 117 | Line 117 | function showBar($title, $value, $max, $units, $input, | |
| 117 | $value = $max - $value; | |
| 118 | } | |
| 119 | ||
| 120 | < | $width = intval($max_width * $value / $max); |
| 121 | < | |
| 122 | < | if ($width < 1) { |
| 120 | > | if(empty($max)) { |
| 121 | $width = 1; | |
| 122 | + | } |
| 123 | + | else { |
| 124 | + | $width = intval($max_width * $value / $max); |
| 125 | + | if ($width < 1) { |
| 126 | + | $width = 1; |
| 127 | + | } |
| 128 | } | |
| 129 | ||
| 130 | ?> | |
| – | Removed lines |
| + | Added lines |
| < | Changed lines |
| > | Changed lines |