summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-07-27 17:10:13 +0200
committerAndrey Andreev <narf@devilix.net>2013-07-27 17:10:13 +0200
commitcccee50381def0777057e9b5803f7f26156c3d8e (patch)
tree6a02f47c889fdacbee235e7680a9ca2dcca30f04 /system
parent627ef043db42b0cfee2620875339f488268519f1 (diff)
parentc1044cb62e39709aa14f86a56bc950a78cfc713c (diff)
Merge pull request #2554 from vlakoff/develop-3
config->item() now returns NULL instead of FALSE when the required item doesn't exist.
Diffstat (limited to 'system')
-rw-r--r--system/core/Config.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/core/Config.php b/system/core/Config.php
index 7e64444bc..109ee6424 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 if the item doesn't exist
*/
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;
}
// --------------------------------------------------------------------
@@ -202,13 +202,13 @@ class CI_Config {
* Fetch a config file item with slash appended (if not empty)
*
* @param string $item Config item name
- * @return string|bool The configuration item or FALSE on failure
+ * @return string|null The configuration item or NULL if the item doesn't exist
*/
public function slash_item($item)
{
if ( ! isset($this->config[$item]))
{
- return FALSE;
+ return NULL;
}
elseif (trim($this->config[$item]) === '')
{