aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions_upload.php1
-rw-r--r--tests/upload/fileupload_test.php3
2 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php
index 16a05a0a56..21ee9a7119 100644
--- a/phpBB/includes/functions_upload.php
+++ b/phpBB/includes/functions_upload.php
@@ -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
diff --git a/tests/upload/fileupload_test.php b/tests/upload/fileupload_test.php
index b30bfe59b4..c362c3461e 100644
--- a/tests/upload/fileupload_test.php
+++ b/tests/upload/fileupload_test.php
@@ -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));
}