diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-13 18:28:28 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-13 18:28:28 +0200 |
commit | 6f1b3841b6f660dfbaa5e00df456d793e67fe60f (patch) | |
tree | 4b2c5b2d3b9b840d2f668843b92c357e42994892 | |
parent | 7de3160f0ed13e773fa5233af0566bcae3f99081 (diff) |
If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
-rw-r--r-- | system/core/Loader.php | 8 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index 7c8b298ac..18024242e 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -935,22 +935,22 @@ class CI_Loader { // first, global next if (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php')) { - include_once($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'); + include($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'); break; } elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php')) { - include_once($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'); + include($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'); break; } elseif (file_exists($path .'config/'.strtolower($class).'.php')) { - include_once($path .'config/'.strtolower($class).'.php'); + include($path .'config/'.strtolower($class).'.php'); break; } elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).'.php')) { - include_once($path .'config/'.ucfirst(strtolower($class)).'.php'); + include($path .'config/'.ucfirst(strtolower($class)).'.php'); break; } } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 9fbadbf2f..77f942b1b 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -112,6 +112,7 @@ Change Log <li class="reactor">Fixed a bug where using <kbd>$this->db->select_max()</kdb>, <kbd>$this->db->select_min()</kdb>, etc could throw notices. Thanks to w43l for the patch.</li> <li class="reactor">Fixed a bug where <a href="libraries/email.html">Email library</a> attachments with a "." in the name would using invalid MIME-types.</li> <li class="reactor">Fixed #378 Robots identified as regular browsers by the User Agent class.</li> + <li class="reactor">If a config class was loaded first then a library with the same name is loaded, the config would be ignored.</li> </ul> <h2>Version 2.0.2</h2> |