From 6b6c274e00fe2357004c0a4e38e6bdb0b2e0ddb4 Mon Sep 17 00:00:00 2001 From: Pascal Kriete Date: Tue, 9 Nov 2010 13:12:22 -0500 Subject: Normalizing package paths to include a single trailing slash. --- system/core/Loader.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'system/core/Loader.php') diff --git a/system/core/Loader.php b/system/core/Loader.php index 5a2175c2d..e2970613b 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -535,6 +535,8 @@ class CI_Loader { */ function add_package_path($path) { + $path = rtrim($path, '/').'/'; + array_unshift($this->_ci_library_paths, $path); array_unshift($this->_ci_model_paths, $path); array_unshift($this->_ci_helper_paths, $path); @@ -569,6 +571,8 @@ class CI_Loader { } else { + $path = rtrim($path, '/').'/'; + foreach (array('_ci_library_paths', '_ci_model_paths', '_ci_helper_paths') as $var) { if (($key = array_search($path, $this->{$var})) !== FALSE) -- cgit v1.2.3-24-g4f1b