diff options
-rw-r--r-- | system/core/Config.php | 2 | ||||
-rw-r--r-- | tests/codeigniter/core/Config_test.php | 8 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/system/core/Config.php b/system/core/Config.php index 14ade7248..e7cbe5624 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -184,7 +184,7 @@ class CI_Config { * * @param string $item Config item name * @param string $index Index name - * @return string|null The configuration item or NULL on failure + * @return string|null The configuration item or NULL if the item doesn't exist */ public function item($item, $index = '') { diff --git a/tests/codeigniter/core/Config_test.php b/tests/codeigniter/core/Config_test.php index e3be8a3fc..72f47cd51 100644 --- a/tests/codeigniter/core/Config_test.php +++ b/tests/codeigniter/core/Config_test.php @@ -24,18 +24,18 @@ class Config_test extends CI_TestCase { $this->assertEquals($this->cfg['base_url'], $this->config->item('base_url')); // Bad Config value - $this->assertFalse($this->config->item('no_good_item')); + $this->assertNull($this->config->item('no_good_item')); // Index - $this->assertFalse($this->config->item('no_good_item', 'bad_index')); - $this->assertFalse($this->config->item('no_good_item', 'default')); + $this->assertNull($this->config->item('no_good_item', 'bad_index')); + $this->assertNull($this->config->item('no_good_item', 'default')); } // -------------------------------------------------------------------- public function test_set_item() { - $this->assertFalse($this->config->item('not_yet_set')); + $this->assertNull($this->config->item('not_yet_set')); $this->config->set_item('not_yet_set', 'is set'); $this->assertEquals('is set', $this->config->item('not_yet_set')); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 71f53059d..77cd39de3 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -408,7 +408,7 @@ Release Date: Not Released - Changed ``site_url()`` method to accept an array as well. - Removed internal method ``_assign_to_config()`` and moved its implementation to *CodeIgniter.php* instead. - - ``item()`` now returns NULL instead of FALSE when the required config item doesn't exist. + - ``item()`` now returns NULL instead of FALSE when the required config item doesn't exist. - :doc:`Security Library <libraries/security>` changes include: |