From 8f5420b5c59cb50dfb4834a3ab9a5bee5faadb1c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Jan 2014 10:34:23 +0200 Subject: Make CI_Input::set_cookie() and cookie helpers set_cookie(), get_cookie(), delete_cookie()'s first (name) parameter mandatory --- system/core/Input.php | 2 +- system/helpers/cookie_helper.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'system') 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); } -- cgit v1.2.3-24-g4f1b