mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/11226] Explicity set file_moved to false
PHPBB3-11226
This commit is contained in:
parent
6a3b343dfc
commit
b75fb96bab
2 changed files with 3 additions and 1 deletions
|
@ -309,6 +309,7 @@ class filespec
|
|||
{
|
||||
@unlink($this->filename);
|
||||
$this->error[] = $user->lang($this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR', $this->destination_file);
|
||||
$this->file_moved = false;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -110,7 +110,8 @@ class phpbb_fileupload_test extends phpbb_test_case
|
|||
copy($this->path . 'jpg', $this->path . 'jpg.jpg');
|
||||
$file = $upload->local_upload($this->path . 'jpg.jpg');
|
||||
$this->assertEquals(0, sizeof($file->error));
|
||||
$file->move_file('../tests/upload/fixture');
|
||||
$this->assertFalse($file->move_file('../tests/upload/fixture'));
|
||||
$this->assertFalse($file->file_moved);
|
||||
$this->assertEquals(1, sizeof($file->error));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue