Not sure if anybody noticed, Matchbox does not load the config files associated with libraries in a module. Say if you have a library called rss.php in modules/blog/libraries and a config file in modules/config/rss.php, Matchbox won’t be able to load the config file and pass the config array as parameter to the library’s constructor (more info here: Passing Parameters When Initializing Your Class).
I had a look into the Loader.php file and after jumping from here and there, I found a bug in the _ci_init_class function which prevented this. At around line number 1035, you’ll find the following code:
$module = $this->_matchbox->argument(3);
if ($config === null) {
if ($filepath = $this->_matchbox->find('config/' . $class . EXT, $module)) {
include($filepath);
}
}change this to:
$module = $this->_matchbox->_module;
if ($config === null) {
// We test for both uppercase and lowercase, for servers that
// are case-sensitive with regard to file names
if ($filepath = $this->_matchbox->find('config/' . strtolower($class) . EXT, $module)) {
include($filepath);
} else {
if ($filepath = $this->_matchbox->find('config/' . ucfirst(strtolower($class)) . EXT, $module)) {
include($filepath);
}
}
}Now it should load the config files properly and will give you peace of mind.
Cheers!