From b1adc25f33838466dfc346257d3aa2025bd6addb Mon Sep 17 00:00:00 2001 From: Benjamin Ulmer Date: Tue, 15 Aug 2023 08:55:01 +0200 Subject: [PATCH] avoid php deprecation warnings by ensuring integer values --- src/phplot.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/phplot.php b/src/phplot.php index c9e206b..e5b7465 100644 --- a/src/phplot.php +++ b/src/phplot.php @@ -2115,7 +2115,7 @@ protected function ProcessTextTTF($draw_it, $font, $angle, $x, $y, $color, $text $ry = $qy + $r10 * $width_factor + $r11 * $font_height; // Finally, draw the text: - ImageTTFText($this->img, $font_size, $angle, $rx, $ry, $color, $font_file, $lines[$i]); + ImageTTFText($this->img, $font_size, $angle, (int)$rx, (int)$ry, (int)$color, $font_file, $lines[$i]); // Step to position of next line. // This is a rotation of (x=0,y=height+line_spacing) by $angle: @@ -7858,7 +7858,7 @@ protected function DrawBar( } // Draw the bar - ImageFilledRectangle($this->img, $x1, $y1, $x2, $y2, $data_color); + ImageFilledRectangle($this->img, (int)$x1, (int)$y1, (int)$x2, (int)$y2, (int)$data_color); // Draw a shade, if shading is on. if (isset($shade_color)) {