Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrejs Griščenko <andrejs.griscenko@zabbix.com>2022-05-30 09:51:55 +0300
committerAndrejs Griščenko <andrejs.griscenko@zabbix.com>2022-05-30 09:51:55 +0300
commit8055c63d810cae2008598d9df455e702f164510a (patch)
treea033768dedd3b3b96c460696629d645756ef17df /ui/chart4.php
parentba3b8a14082a4a1dda6b4bb4d7e56cc35814071e (diff)
..F....... [ZBXNEXT-7722] fixed runtime error "implicit conversion from float to integer loses precision"
Diffstat (limited to 'ui/chart4.php')
-rw-r--r--ui/chart4.php4
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
}