diff options
author | Andrey Andreev <narf@devilix.net> | 2014-01-06 09:34:23 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-01-06 09:34:23 +0100 |
commit | 8f5420b5c59cb50dfb4834a3ab9a5bee5faadb1c (patch) | |
tree | 86d4db2e675dd5bff222dc9a47893c85d59ed87e | |
parent | cb663676e63c7a4c792181dabea3fd834514cea2 (diff) |
Make CI_Input::set_cookie() and cookie helpers set_cookie(), get_cookie(), delete_cookie()'s first (name) parameter mandatory
-rw-r--r-- | system/core/Input.php | 2 | ||||
-rw-r--r-- | system/helpers/cookie_helper.php | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/system/core/Input.php b/system/core/Input.php index 384e30d43..ded462190 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -361,7 +361,7 @@ class CI_Input { * @param bool $httponly Whether to only makes the cookie accessible via HTTP (no javascript) * @return void */ - public function set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) + public function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) { if (is_array($name)) { diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php index e5cf6b1d6..e465412cf 100644 --- a/system/helpers/cookie_helper.php +++ b/system/helpers/cookie_helper.php @@ -56,7 +56,7 @@ 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 = FALSE, $httponly = FALSE) + function set_cookie($name, $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE) { // Set the config file options $CI =& get_instance(); @@ -75,7 +75,7 @@ if ( ! function_exists('get_cookie')) * @param bool * @return mixed */ - function get_cookie($index = '', $xss_clean = FALSE) + function get_cookie($index, $xss_clean = FALSE) { $CI =& get_instance(); $prefix = isset($_COOKIE[$index]) ? '' : config_item('cookie_prefix'); @@ -96,7 +96,7 @@ if ( ! function_exists('delete_cookie')) * @param string the cookie prefix * @return void */ - function delete_cookie($name = '', $domain = '', $path = '/', $prefix = '') + function delete_cookie($name, $domain = '', $path = '/', $prefix = '') { set_cookie($name, '', '', $domain, $path, $prefix); } |