mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-22 02:50:00 +01:00
[ticket/11226] Explicity set file_moved to false
PHPBB3-11226
This commit is contained in:
parent
6a3b343dfc
commit
b75fb96bab
@ -309,6 +309,7 @@ class filespec
|
|||||||
{
|
{
|
||||||
@unlink($this->filename);
|
@unlink($this->filename);
|
||||||
$this->error[] = $user->lang($this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR', $this->destination_file);
|
$this->error[] = $user->lang($this->upload->error_prefix . 'GENERAL_UPLOAD_ERROR', $this->destination_file);
|
||||||
|
$this->file_moved = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -110,7 +110,8 @@ class phpbb_fileupload_test extends phpbb_test_case
|
|||||||
copy($this->path . 'jpg', $this->path . 'jpg.jpg');
|
copy($this->path . 'jpg', $this->path . 'jpg.jpg');
|
||||||
$file = $upload->local_upload($this->path . 'jpg.jpg');
|
$file = $upload->local_upload($this->path . 'jpg.jpg');
|
||||||
$this->assertEquals(0, sizeof($file->error));
|
$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));
|
$this->assertEquals(1, sizeof($file->error));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user