From 8ce130266e59e334e1c2b249dfc97b255b065b83 Mon Sep 17 00:00:00 2001 From: Miroslav Yovchev Date: Mon, 21 Mar 2016 19:21:41 +0200 Subject: [PATCH] Fix broken file upload - temp file unexpectedly renamed --- e107_handlers/upload_handler.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_handlers/upload_handler.php b/e107_handlers/upload_handler.php index 0344165f5..b14407762 100644 --- a/e107_handlers/upload_handler.php +++ b/e107_handlers/upload_handler.php @@ -300,7 +300,9 @@ function process_uploaded_files($uploaddir, $fileinfo = FALSE, $options = NULL) if (!$first_error) // All tests passed - can store it somewhere { - $uploaded[$c] = e107::getFile()->get_file_info($uploadfile,true); + // File upload broken - temp file renamed. + // FIXME - method starting with 'get' shouldn't do system file changes. + $uploaded[$c] = e107::getFile()->get_file_info($uploadfile, true, false); $uploaded[$c]['name'] = $name; $uploaded[$c]['rawname'] = $raw_name;