diff --git a/MY_Upload.php b/MY_Upload.php index 0d36b10..6bc3a3e 100644 --- a/MY_Upload.php +++ b/MY_Upload.php @@ -9,7 +9,7 @@ class MY_Upload extends CI_Upload { public function do_multi_upload( $field = 'userfile', $return_info = TRUE, $filenames = NULL ){ // Is $_FILES[$field] set? If not, no reason to continue. - if ( ! isset($_FILES[$field])) + if ( empty($_FILES[$field]) ) { $this->set_error('upload_no_file_selected'); @@ -160,7 +160,7 @@ public function do_multi_upload( $field = 'userfile', $return_info = TRUE, $file } // Sanitize the file name for security - $this->file_name = $this->clean_file_name($this->file_name); + $this->file_name = $this->_CI->security->sanitize_filename($this->file_name); // Truncate the file name if it's too long if ($this->max_filename > 0)