summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@gmail.com>2021-03-01 18:45:24 +0100
committerGeorge Petculescu <gxgpet@gmail.com>2021-03-01 18:45:24 +0100
commitcd192363f777731e8f382fe7288a44183a448213 (patch)
tree006cec1c011dc2187cdb470c57bcfdb915557201 /system
parenteb770fdc6d809bc7c28d499f897c0ab2c449f669 (diff)
Fixes "expires" cookie attribute bug
Diffstat (limited to 'system')
-rw-r--r--system/core/Input.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index a7f4edee9..d397850b7 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -364,7 +364,7 @@ class CI_Input {
}
$cookie_header = 'Set-Cookie: '.$prefix.$name.'='.rawurlencode($value);
- $cookie_header .= ($expire === 0 ? '' : '; expires='.gmdate('D, d-M-Y H:i:s T', 0));
+ $cookie_header .= ($expire === 0 ? '' : '; expires='.gmdate('D, d-M-Y H:i:s T', $expire));
$cookie_header .= '; path='.$path.($domain !== '' ? '; domain='.$domain : '');
$cookie_header .= ($secure ? '; secure' : '').($httponly ? '; HttpOnly' : '').($samesite !== NULL ? '; SameSite='.$samesite : '');
header($cookie_header);