summaryrefslogtreecommitdiffstats
path: root/system/core/Security.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-10-05 23:00:08 +0200
committerAndrey Andreev <narf@devilix.net>2014-10-05 23:00:08 +0200
commitd444d445ed0458a352ecb9ff79ffd158677ee805 (patch)
treedcdbe4b38dbb343498b2ea2a37556cb358cd5720 /system/core/Security.php
parent86d7eadf102c798f2aa70a86e86fd0f5050d9574 (diff)
config_item() to return NULL instead of FALSE for non-existing items
Close #3001 Close #3232 Related: #3244
Diffstat (limited to 'system/core/Security.php')
-rwxr-xr-xsystem/core/Security.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Security.php b/system/core/Security.php
index 15a66430a..cffdb9ad9 100755
--- a/system/core/Security.php
+++ b/system/core/Security.php
@@ -158,7 +158,7 @@ class CI_Security {
public function __construct()
{
// Is CSRF protection enabled?
- if (config_item('csrf_protection') === TRUE)
+ if (config_item('csrf_protection'))
{
// CSRF config
foreach (array('csrf_expire', 'csrf_token_name', 'csrf_cookie_name') as $key)
@@ -170,9 +170,9 @@ class CI_Security {
}
// Append application specific cookie prefix
- if (config_item('cookie_prefix'))
+ if ($cookie_prefix = config_item('cookie_prefix'))
{
- $this->_csrf_cookie_name = config_item('cookie_prefix').$this->_csrf_cookie_name;
+ $this->_csrf_cookie_name = $cookie_prefix.$this->_csrf_cookie_name;
}
// Set the CSRF hash