summaryrefslogtreecommitdiffstats
path: root/system/helpers/cookie_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/cookie_helper.php')
-rw-r--r--system/helpers/cookie_helper.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index abe492f8e..0325e3db3 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.php
@@ -60,7 +60,7 @@ if ( ! function_exists('set_cookie'))
*
* @param mixed
* @param string the value of the cookie
- * @param string the number of seconds until expiration
+ * @param int the number of seconds until expiration
* @param string the cookie domain. Usually: .yourdomain.com
* @param string the cookie path
* @param string the cookie prefix
@@ -68,10 +68,10 @@ if ( ! function_exists('set_cookie'))
* @param bool true makes the cookie accessible via http(s) only (no javascript)
* @return void
*/
- function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL)
+ function set_cookie($name, $value = '', $expire = 0, $domain = '', $path = '/', $prefix = '', $secure = NULL, $httponly = NULL, $samesite = NULL)
{
// Set the config file options
- get_instance()->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly);
+ get_instance()->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure, $httponly, $samesite);
}
}
@@ -86,9 +86,8 @@ if ( ! function_exists('get_cookie'))
* @param bool
* @return mixed
*/
- function get_cookie($index, $xss_clean = NULL)
+ function get_cookie($index, $xss_clean = FALSE)
{
- is_bool($xss_clean) OR $xss_clean = (config_item('global_xss_filtering') === TRUE);
$prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix');
return get_instance()->input->cookie($prefix.$index, $xss_clean);
}