summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorDarren Benney <cutenfuzzy@gmail.com>2013-03-30 19:17:54 +0100
committerDarren Benney <cutenfuzzy@gmail.com>2013-03-30 19:17:54 +0100
commite123a6046a4c8447a2221c9ed8279848d5cc672b (patch)
treec4d4d0a470c0662112b5847724e883ae0723a1d9 /system/libraries/Upload.php
parent54e6c1b04a786dc35b2fdeda456685a10f7d2073 (diff)
Modified do_upload() to use UPLOAD_ERR constants.
Modified switchcase in the do_upload() use the UPLOAD_ERR_* constants, instead of just using an integer, and then commenting out the constant beside it.
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 1c14f99ed..0c6b7e6a5 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -366,25 +366,25 @@ class CI_Upload {
switch ($error)
{
- case 1: // UPLOAD_ERR_INI_SIZE
+ case UPLOAD_ERR_INI_SIZE:
$this->set_error('upload_file_exceeds_limit');
break;
- case 2: // UPLOAD_ERR_FORM_SIZE
+ case UPLOAD_ERR_FORM_SIZE:
$this->set_error('upload_file_exceeds_form_limit');
break;
- case 3: // UPLOAD_ERR_PARTIAL
+ case UPLOAD_ERR_PARTIAL:
$this->set_error('upload_file_partial');
break;
- case 4: // UPLOAD_ERR_NO_FILE
+ case UPLOAD_ERR_NO_FILE:
$this->set_error('upload_no_file_selected');
break;
- case 6: // UPLOAD_ERR_NO_TMP_DIR
+ case UPLOAD_ERR_NO_TMP_DIR:
$this->set_error('upload_no_temp_directory');
break;
- case 7: // UPLOAD_ERR_CANT_WRITE
+ case UPLOAD_ERR_CANT_WRITE:
$this->set_error('upload_unable_to_write_file');
break;
- case 8: // UPLOAD_ERR_EXTENSION
+ case UPLOAD_ERR_EXTENSION:
$this->set_error('upload_stopped_by_extension');
break;
default: