From 6f1b3841b6f660dfbaa5e00df456d793e67fe60f Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sat, 13 Aug 2011 10:28:28 -0600 Subject: If a config class was loaded first then a library with the same name is loaded, the config would be ignored. --- system/core/Loader.php | 8 ++++---- 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
  • Fixed a bug where using $this->db->select_max(), $this->db->select_min(), etc could throw notices. Thanks to w43l for the patch.
  • Fixed a bug where Email library attachments with a "." in the name would using invalid MIME-types.
  • Fixed #378 Robots identified as regular browsers by the User Agent class.
  • +
  • If a config class was loaded first then a library with the same name is loaded, the config would be ignored.
  • Version 2.0.2

    -- cgit v1.2.3-24-g4f1b