From 4becf438e12f43ca3bd07fb7cd2cb6767fcbc231 Mon Sep 17 00:00:00 2001 From: Ruben Calvo Date: Thu, 28 Nov 2024 22:24:28 +0100 Subject: [PATCH] [ticket/17361] Remove temp files PHPBB-17361 --- phpBB/phpbb/console/command/thumbnail/generate.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpBB/phpbb/console/command/thumbnail/generate.php b/phpBB/phpbb/console/command/thumbnail/generate.php index 8c8c46dd6d..dfc6480510 100644 --- a/phpBB/phpbb/console/command/thumbnail/generate.php +++ b/phpBB/phpbb/console/command/thumbnail/generate.php @@ -151,10 +151,12 @@ class generate extends \phpbb\console\command\command $destination = tempnam(sys_get_temp_dir(), 'thumbnail_destination'); file_put_contents($source, $this->storage->read($row['physical_filename'])); + @unlink($source); if (create_thumbnail($source, $destination, $row['mimetype'])) { $this->storage->write('thumb_' . $row['physical_filename'], fopen($destination, 'rb')); + @unlink($destination); $thumbnail_created[] = (int) $row['attach_id'];