summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-rw-r--r--application/controllers/file.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/application/controllers/file.php b/application/controllers/file.php
index 2e8664984..c2838b795 100644
--- a/application/controllers/file.php
+++ b/application/controllers/file.php
@@ -232,7 +232,12 @@ class File extends CI_Controller {
4=>"No file was uploaded",
6=>"Missing a temporary folder"
);
- $this->data["msg"] = $errors[$_FILES['file']['error']];
+
+ $this->data["msg"] = "Unknown error.";
+
+ if (isset($_FILES["file"])) {
+ $this->data["msg"] = $errors[$_FILES['file']['error']];
+ }
$this->load->view($this->var->view_dir.'/header', $this->data);
$this->load->view($this->var->view_dir.'/upload_error', $this->data);
$this->load->view($this->var->view_dir.'/footer');