summaryrefslogtreecommitdiffstats
path: root/user_guide_src
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 /user_guide_src
parent71b4a45a4de4ffd8e502d9632ffb6c5c099da94e (diff)
Close #4904
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst2
-rw-r--r--user_guide_src/source/libraries/input.rst8
2 files changed, 6 insertions, 4 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 74fb15798..a8467dcf1 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -24,6 +24,8 @@ Release Date: Not Released
- Removed previously deprecated ``$config['allow_get_array']``.
- Removed previously deprecated ``$config['standardize_newlines']``.
- Removed previously deprecated method ``is_cli_request()`` (use :php:func:`is_cli()` instead).
+ - Changed the ``set_cookie()`` method's default expiry time to 0 (expires when browser is closed).
+ - Changed the ``set_cookie()`` method to delete the cookie if a negative expiry time is passed to it.
- Libraries
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index 97460c2c5..aee39584a 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -242,7 +242,7 @@ Class Reference
This method is identical to ``get()``, ``post()`` and ``cookie()``,
only it fetches the *php://input* stream data.
- .. php:method:: set_cookie($name = ''[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]])
+ .. php:method:: set_cookie($name = ''[, $value = ''[, $expire = 0[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]])
:param mixed $name: Cookie name or an array of parameters
:param string $value: Cookie value
@@ -267,7 +267,7 @@ Class Reference
$cookie = array(
'name' => 'The Cookie Name',
'value' => 'The Value',
- 'expire' => '86500',
+ 'expire' => 86500,
'domain' => '.some-domain.com',
'path' => '/',
'prefix' => 'myprefix_',
@@ -278,8 +278,8 @@ Class Reference
**Notes**
- Only the name and value are required. To delete a cookie set it with the
- expiration blank.
+ Only the name and value are required. To delete a cookie set the expiry
+ time to a negative, or non-numeric value.
The expiration is set in **seconds**, which will be added to the current
time. Do not include the time, but rather only the number of seconds