mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-25 01:51:21 +01:00
[ticket/15286] Remove thumbnail if there is an error
PHPBB3-15286
This commit is contained in:
parent
f80c59cb05
commit
ed2165342f
@ -206,6 +206,14 @@ class upload
|
||||
if (count($this->file->error))
|
||||
{
|
||||
$this->file->remove($this->storage);
|
||||
|
||||
// Remove thumbnail if exists
|
||||
$thumbnail_file = 'thumb_' . $this->file->get('realname');
|
||||
if ($this->storage->exists($thumbnail_file))
|
||||
{
|
||||
$this->storage->delete($thumbnail_file);
|
||||
}
|
||||
|
||||
$this->file_data['error'] = array_merge($this->file_data['error'], $this->file->error);
|
||||
$this->file_data['post_attach'] = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user