summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authortianhe1986 <w1s2j3229@163.com>2016-07-11 12:01:54 +0200
committertianhe1986 <w1s2j3229@163.com>2016-07-11 12:01:54 +0200
commitb185e2f8ad6ab11ebd5e11dc3d829aea952b92b7 (patch)
treebcac84b0541b5495cea87137f52564ca288eb968 /system/libraries
parentc20db3181733f701987d856f793f22b227d21762 (diff)
Use negative length for speeding up.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
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 7b94a230c..056f6de1e 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' => substr($this->file_name, 0, strlen($this->file_name) - strlen($this->file_ext)),
+ 'raw_name' => substr($this->file_name, 0, -strlen($this->file_ext)),
'orig_name' => $this->orig_name,
'client_name' => $this->client_name,
'file_ext' => $this->file_ext,