Skip to content

Commit a570201

Browse files
Carlos Garciaclaude
andcommitted
Remove deprecated imagedestroy() calls for PHP 8.5 compatibility
imagedestroy() has had no effect since PHP 8.0 (GD resources are now objects freed by the GC) and is formally deprecated in PHP 8.5. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2dda7c6 commit a570201

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Core/Model/AttachedFile.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ protected function stripImageMetadata(string $filePath, string $mimeType): void
325325
$image = @imagecreatefromjpeg($filePath);
326326
if ($image) {
327327
imagejpeg($image, $filePath, 95);
328-
imagedestroy($image);
329328
}
330329
break;
331330

@@ -335,7 +334,6 @@ protected function stripImageMetadata(string $filePath, string $mimeType): void
335334
imagealphablending($image, false);
336335
imagesavealpha($image, true);
337336
imagepng($image, $filePath, 6);
338-
imagedestroy($image);
339337
}
340338
break;
341339

@@ -348,7 +346,6 @@ protected function stripImageMetadata(string $filePath, string $mimeType): void
348346
imagealphablending($image, false);
349347
imagesavealpha($image, true);
350348
imagewebp($image, $filePath, 95);
351-
imagedestroy($image);
352349
}
353350
break;
354351
}

0 commit comments

Comments
 (0)