Browse Source

:wrench: QRGdImage: fix "Implicit conversion from float to int" in PHP 8.1

smiley 3 years ago
parent
commit
66ac346c36
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/Output/QRGdImage.php

+ 4 - 4
src/Output/QRGdImage.php

@@ -150,10 +150,10 @@ class QRGdImage extends QROutputAbstract{
 		$this->options->drawCircularModules && $this->matrix->checkTypeNotIn($x, $y, $this->options->keepAsSquare)
 		$this->options->drawCircularModules && $this->matrix->checkTypeNotIn($x, $y, $this->options->keepAsSquare)
 			? imagefilledellipse(
 			? imagefilledellipse(
 				$this->image,
 				$this->image,
-				($x * $this->scale) + ($this->scale / 2),
-				($y * $this->scale) + ($this->scale / 2),
-				2 * $this->options->circleRadius * $this->scale,
-				2 * $this->options->circleRadius * $this->scale,
+				(int)(($x * $this->scale) + ($this->scale / 2)),
+				(int)(($y * $this->scale) + ($this->scale / 2)),
+				(int)(2 * $this->options->circleRadius * $this->scale),
+				(int)(2 * $this->options->circleRadius * $this->scale),
 				$color
 				$color
 			)
 			)
 			: imagefilledrectangle(
 			: imagefilledrectangle(