summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorchestnutprog <l6979630@hotmail.com>2016-07-06 15:13:22 +0200
committerGitHub <noreply@github.com>2016-07-06 15:13:22 +0200
commit87f7634117c34a7667b1eb13c39bf8e53bdb1b87 (patch)
tree267b1290fbdd7e4ba7a4fcaaaf8a4ac07d162f37 /system/libraries
parent2d9e1dc24e47a57b97cbc60cdff287656474ebca (diff)
Update Upload.php
特殊文件名可能会引起bug
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Upload.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index fa365058c..7b94a230c 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -601,7 +601,7 @@ class CI_Upload {
'file_type' => $this->file_type,
'file_path' => $this->upload_path,
'full_path' => $this->upload_path.$this->file_name,
- 'raw_name' => str_replace($this->file_ext, '', $this->file_name),
+ 'raw_name' => substr($this->file_name, 0, strlen($this->file_name) - strlen($this->file_ext)),
'orig_name' => $this->orig_name,
'client_name' => $this->client_name,
'file_ext' => $this->file_ext,