From b185e2f8ad6ab11ebd5e11dc3d829aea952b92b7 Mon Sep 17 00:00:00 2001 From: tianhe1986 Date: Mon, 11 Jul 2016 18:01:54 +0800 Subject: Use negative length for speeding up. Signed-off-by: tianhe1986 --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') 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, -- cgit v1.2.3-24-g4f1b