summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/service/files.php2
-rw-r--r--application/tests/test_service_files.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/application/service/files.php b/application/service/files.php
index 802ba70af..922320e11 100644
--- a/application/service/files.php
+++ b/application/service/files.php
@@ -125,7 +125,7 @@ class files {
}
if ($error_message != "") {
- $errors[] = array(
+ $errors[$file["formfield"]] = array(
"filename" => $file["name"],
"formfield" => $file["formfield"],
"message" => $error_message,
diff --git a/application/tests/test_service_files.php b/application/tests/test_service_files.php
index 3330e8c22..8789a9888 100644
--- a/application/tests/test_service_files.php
+++ b/application/tests/test_service_files.php
@@ -71,7 +71,7 @@ class test_service_files extends Test {
$data = $e->get_data();
$this->t->is($e->get_error_id(), "file/upload-verify", "verify should error");
$this->t->is_deeply(array(
- array(
+ 'file[1]' => array(
'filename' => 'foobar.txt',
'formfield' => 'file[1]',
'message' => 'No file was uploaded',