Skip to content

Commit 04fe9ef

Browse files
committed
Fix PHP 8.5 deprecation
`imagedestroy` is a no-op on PHP 8.0+ due to the migration to objects and is deprecated as of PHP 8.5.
1 parent ee2c40d commit 04fe9ef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/Basic/ScreenshotTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public function testScreenshot(): void
2525
$this->fail('The screenshot should be a valid image');
2626
}
2727

28-
imagedestroy($img);
28+
if (\PHP_VERSION_ID < 80000) {
29+
imagedestroy($img);
30+
}
2931
}
3032
}

0 commit comments

Comments
 (0)