summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2013-07-24 03:43:39 +0200
committervlakoff <vlakoff@gmail.com>2013-07-24 03:43:39 +0200
commit184cf1b5a719f4559767a221520d5ba96d1e4d8b (patch)
treed3b1060bc1610e961ab6c32d4be372c8459c19bb /system
parent1eb59c99a4097f9cfdb99434a88a73535a5fbb57 (diff)
config->item() now returns NULL instead of FALSE when the required item doesn't exist.
Uniformization with other functions. This also brings the ability to properly use booleans in configuration.
Diffstat (limited to 'system')
-rw-r--r--system/core/Config.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Config.php b/system/core/Config.php
index 7e64444bc..14ade7248 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -184,16 +184,16 @@ class CI_Config {
*
* @param string $item Config item name
* @param string $index Index name
- * @return string|bool The configuration item or FALSE on failure
+ * @return string|null The configuration item or NULL on failure
*/
public function item($item, $index = '')
{
if ($index == '')
{
- return isset($this->config[$item]) ? $this->config[$item] : FALSE;
+ return isset($this->config[$item]) ? $this->config[$item] : NULL;
}
- return isset($this->config[$index], $this->config[$index][$item]) ? $this->config[$index][$item] : FALSE;
+ return isset($this->config[$index], $this->config[$index][$item]) ? $this->config[$index][$item] : NULL;
}
// --------------------------------------------------------------------