1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 12:30:42 +02:00

[ticket/17361] Remove temp files

PHPBB-17361
This commit is contained in:
Ruben Calvo
2024-11-28 22:24:28 +01:00
parent a8399c1431
commit 4becf438e1

View File

@@ -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'];