From c5f8f45391b182232067a9759f696b407266c609 Mon Sep 17 00:00:00 2001 From: Daniel Hudson Date: Thu, 29 Jul 2021 13:23:17 +0100 Subject: [PATCH] Add PHP8 GDImage object support --- src/Intervention/Image/Gd/Commands/ResetCommand.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Intervention/Image/Gd/Commands/ResetCommand.php b/src/Intervention/Image/Gd/Commands/ResetCommand.php index 12c41bf6..16f1aef0 100644 --- a/src/Intervention/Image/Gd/Commands/ResetCommand.php +++ b/src/Intervention/Image/Gd/Commands/ResetCommand.php @@ -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());