summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2013-04-01 00:05:11 +0200
committerAndrey Andreev <narf@bofh.bg>2013-04-01 00:05:11 +0200
commit1af54e842b6b6e2aecd177b3cf6ae2e17be31f4a (patch)
tree7f8a30723bf1b83626c7e42969cd63782b57d4dc
parentce92b8122372a9e19afb76ab6645712df24f5be1 (diff)
parente123a6046a4c8447a2221c9ed8279848d5cc672b (diff)
Merge pull request #2371 from thefuzzy0ne/fix/upload_err_constants
Modified do_upload() to use UPLOAD_ERR constants.
-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: