[ticket/11226] filespec::move_file() should error correctly

PHPBB3-11226
This commit is contained in:
Tristan Darricau 2014-05-10 15:02:10 +02:00
parent d4fc060bcd
commit eee2091201

View file

@ -308,6 +308,8 @@ class filespec
if (file_exists($this->destination_file) && !$overwrite) if (file_exists($this->destination_file) && !$overwrite)
{ {
@unlink($this->filename); @unlink($this->filename);
$this->error[] = sprintf($user->lang[$this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR'], $this->destination_file);
return false;
} }
else else
{ {