1
0
mirror of https://github.com/Intervention/image.git synced 2025-08-25 14:50:48 +02:00

Add PHP8 GDImage object support

This commit is contained in:
Daniel Hudson
2021-07-29 13:23:17 +01:00
committed by GitHub
parent 0925f10b25
commit c5f8f45391

View File

@@ -16,8 +16,9 @@ class ResetCommand extends AbstractCommand
public function execute($image)
{
$backupName = $this->argument(0)->value();
if (is_resource($backup = $image->getBackup($backupName))) {
$backup = $image->getBackup($backupName)
if (is_resource($backup) || $backup instanceof \GdImage) {
// destroy current resource
imagedestroy($image->getCore());