summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2017-01-04 16:19:30 +0100
committerAndrey Andreev <narf@devilix.net>2017-01-04 16:19:30 +0100
commit806e014ec46f739398d7510b07be62593e0c3377 (patch)
tree64649cec7361540201ca3a99e3e95e7a05f312aa /system/core/Input.php
parent71b4a45a4de4ffd8e502d9632ffb6c5c099da94e (diff)
Close #4904
Diffstat (limited to 'system/core/Input.php')
-rw-r--r--system/core/Input.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index a7918aefb..0585b42fe 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -304,7 +304,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 = 0, $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE)
{
if (is_array($name))
{
@@ -343,9 +343,9 @@ class CI_Input {
$httponly = config_item('cookie_httponly');
}
- if ( ! is_numeric($expire))
+ if ( ! is_numeric($expire) || $expire < 0)
{
- $expire = time() - 86500;
+ $expire = 1;
}
else
{