Codeigniter HMVC + ion_auth trouble loading the config items
This is the inner implementation of the CodeIgniter function config->item() found in the file system\core\Config.php
/** * Fetch a config file item * * @param string $item Config item name * @param string $index Index name * @return string|null The configuration item or NULL if the item doesn't exist */public function item($item, $index = ''){ if ($index == '') { return isset($this->config[$item]) ? $this->config[$item] : NULL; } return isset($this->config[$index], $this->config[$index][$item]) ? $this->config[$index][$item] : NULL;}
When you pass the $index
parameter, the function checks if both parameters are initialized in the config and returns config[$index]
of the CI instance; or null
if any of them is not initialized.
If config[$item]
is not set in the CI instance, the function returns always null
. Let's assume this is not the case, as your call don't crash when avoiding $index
.
So when you pass $index
as the second parameter, your code crashes because the function returns null
, and that means that the config[$index]
of the CI instance is not set. Now the question is why it's not set, and I can't help you here, but it looks like you are missing to load some modules.
Best regards