Skip to content

Commit bc7ba5e

Browse files
committed
:octocat: PHP 8.5 deprecation: imagedestroy()
1 parent b1efebb commit bc7ba5e

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

examples/imageWithText.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ protected function addText(string $text):void{
7575

7676
// copy over the qrcode
7777
imagecopymerge($this->image, $qrcode, 0, 0, 0, 0, $this->length, $this->length, 100);
78-
imagedestroy($qrcode);
7978

8079
$fontColor = imagecolorallocate($this->image, ...$textColor);
8180
$w = imagefontwidth($textSize);

src/Output/QRGdImage.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use ErrorException;
1818
use Throwable;
1919
use function array_values, count, extension_loaded, imagebmp, imagecolorallocate, imagecolortransparent,
20-
imagecreatetruecolor, imagedestroy, imagefilledellipse, imagefilledrectangle, imagegif, imagejpeg, imagepng,
20+
imagecreatetruecolor, imagefilledellipse, imagefilledrectangle, imagegif, imagejpeg, imagepng,
2121
imagescale, imagetypes, imagewebp, intdiv, intval, is_array, is_numeric, max, min, ob_end_clean, ob_get_contents, ob_start,
2222
restore_error_handler, set_error_handler, sprintf;
2323
use const IMG_BMP, IMG_GIF, IMG_JPG, IMG_PNG, IMG_WEBP;
@@ -378,7 +378,6 @@ protected function dumpImage():string{
378378
$this->renderImage();
379379

380380
$imageData = ob_get_contents();
381-
imagedestroy($this->image);
382381
}
383382
// not going to cover edge cases
384383
// @codeCoverageIgnoreStart

0 commit comments

Comments
 (0)