From 7d7217c38187bfa5b644d49a061e18533520cf5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Calvo?= Date: Sun, 1 Jul 2018 19:20:20 +0200 Subject: [PATCH] [ticket/15342] Move call to remove file PHPBB3-15342 --- phpBB/phpbb/attachment/upload.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/phpBB/phpbb/attachment/upload.php b/phpBB/phpbb/attachment/upload.php index 592712c643..1f3c8c762e 100644 --- a/phpBB/phpbb/attachment/upload.php +++ b/phpBB/phpbb/attachment/upload.php @@ -199,6 +199,7 @@ class upload // Check for attachment quota and free space if (!$this->check_attach_quota() || !$this->check_disk_space()) { + $this->file->remove($this->storage); return $this->file_data; } @@ -321,8 +322,6 @@ class upload $this->file_data['error'][] = $this->language->lang('ATTACH_QUOTA_REACHED'); $this->file_data['post_attach'] = false; - $this->file->remove($this->storage); - return false; } } @@ -353,8 +352,6 @@ class upload } $this->file_data['post_attach'] = false; - $this->file->remove($this->storage); - return false; } }