diff options
author | Andrejs Griščenko <andrejs.griscenko@zabbix.com> | 2022-05-30 09:51:55 +0300 |
---|---|---|
committer | Andrejs Griščenko <andrejs.griscenko@zabbix.com> | 2022-05-30 09:51:55 +0300 |
commit | 8055c63d810cae2008598d9df455e702f164510a (patch) | |
tree | a033768dedd3b3b96c460696629d645756ef17df | |
parent | ba3b8a14082a4a1dda6b4bb4d7e56cc35814071e (diff) |
..F....... [ZBXNEXT-7722] fixed runtime error "implicit conversion from float to integer loses precision"
-rw-r--r-- | ui/chart4.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/chart4.php b/ui/chart4.php index f20c2367167..3c4126d029f 100644 --- a/ui/chart4.php +++ b/ui/chart4.php @@ -138,9 +138,9 @@ $maxX = 900; $minX = 0; for ($i = 1; $i <= $weeks; $i++) { - $x1 = (900 / 52) * $sizeX * ($i - 1 - $minX) / ($maxX - $minX); + $x1 = (int) ((900 / 52) * $sizeX * ($i - 1 - $minX) / ($maxX - $minX)); - $yt = $sizeY * $true[$i - 1] / 100; + $yt = (int) ($sizeY * $true[$i - 1] / 100); if ($yt > 0) { imagefilledrectangle($im, $x1 + $shiftX, $shiftYup, $x1 + $shiftX + 8, $yt + $shiftYup, imagecolorallocate($im, 235, 120, 120)); // red } |