diff options
author | Derek Jones <derek.jones@ellislab.com> | 2008-01-18 21:45:28 +0100 |
---|---|---|
committer | Derek Jones <derek.jones@ellislab.com> | 2008-01-18 21:45:28 +0100 |
commit | c4c0ac4d4eebc414a63b49357d73e80204d1ad86 (patch) | |
tree | b61b9306ca7cf26545ff9ced9eaace281bdec933 /system/libraries | |
parent | b2bbd6143d94fc0a971b242cc82f5d62ba5eda4e (diff) |
added greater precision to $_FILE upload errors
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Upload.php | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index d045fd24d..387f72526 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -154,11 +154,26 @@ class CI_Upload { switch($error)
{
- case 1 : $this->set_error('upload_file_exceeds_limit');
+ case 1: // UPLOAD_ERR_INI_SIZE
+ $this->set_error('upload_file_exceeds_limit');
break;
- case 3 : $this->set_error('upload_file_partial');
+ case 2: // UPLOAD_ERR_FORM_SIZE
+ $this->set_error('upload_file_exceeds_form_limit');
break;
- case 4 : $this->set_error('upload_no_file_selected');
+ case 3: // UPLOAD_ERR_PARTIAL
+ $this->set_error('upload_file_partial');
+ break;
+ case 4: // UPLOAD_ERR_NO_FILE
+ $this->set_error('upload_no_file_selected');
+ break;
+ case 6: // UPLOAD_ERR_NO_TMP_DIR
+ $this->set_error('upload_no_temp_directory');
+ break;
+ case 7: // UPLOAD_ERR_CANT_WRITE
+ $this->set_error('upload_unable_to_write_file');
+ break;
+ case 8: // UPLOAD_ERR_EXTENSION
+ $this->set_error('upload_stopped_by_extension');
break;
default : $this->set_error('upload_no_file_selected');
break;
|