diff options
author | Andrey Andreev <narf@devilix.net> | 2013-07-17 11:20:21 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-07-17 11:20:21 +0200 |
commit | c1fdef52bcf1ce6d0803af56fd93e311b8340984 (patch) | |
tree | 8c671ac042831d62aec274b5741416a27e94aac6 /system/libraries/Upload.php | |
parent | 0b97f8e21bc5bf5f83099bf48a6937c0e46881ef (diff) | |
parent | 38d5f4b98a55012361fc30c4f3e0daa489ca8e21 (diff) |
Merge pull request #2417 from thefuzzy0ne/fix/upload_dry
Fix/upload dry
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r-- | system/libraries/Upload.php | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 5861df584..85428044d 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -1090,18 +1090,14 @@ class CI_Upload { $CI =& get_instance(); $CI->lang->load('upload'); - if (is_array($msg)) + if ( ! is_array($msg)) { - foreach ($msg as $val) - { - $msg = ($CI->lang->line($val) === FALSE) ? $val : $CI->lang->line($val); - $this->error_msg[] = $msg; - log_message('error', $msg); - } + $msg = array($msg); } - else + + foreach ($msg as $val) { - $msg = ($CI->lang->line($msg) === FALSE) ? $msg : $CI->lang->line($msg); + $msg = ($CI->lang->line($val) === FALSE) ? $val : $CI->lang->line($val); $this->error_msg[] = $msg; log_message('error', $msg); } |