mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/15286] Remove thumbnail if there is an error
PHPBB3-15286
This commit is contained in:
parent
f80c59cb05
commit
ed2165342f
1 changed files with 8 additions and 0 deletions
|
@ -206,6 +206,14 @@ class upload
|
||||||
if (count($this->file->error))
|
if (count($this->file->error))
|
||||||
{
|
{
|
||||||
$this->file->remove($this->storage);
|
$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['error'] = array_merge($this->file_data['error'], $this->file->error);
|
||||||
$this->file_data['post_attach'] = false;
|
$this->file_data['post_attach'] = false;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue