Skip to content

Commit 84019e0

Browse files
committed
fix: remove imagedestroy() deprecation on PHP 8.5+
1 parent 9826ab5 commit 84019e0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Renderer/PngRenderer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,10 @@ public function render(array $matrix): string
7979
ob_start();
8080
imagepng($image);
8181
$data = ob_get_clean();
82-
imagedestroy($image);
82+
83+
if (PHP_VERSION_ID < 80000) {
84+
imagedestroy($image);
85+
}
8386

8487
if ($data === false) {
8588
throw new \RuntimeException('Failed to capture PNG output');

0 commit comments

Comments
 (0)