ID: 27267
Updated by: [EMAIL PROTECTED]
Reported By: silkensedai at online dot fr
-Status: Open
+Status: Bogus
Bug Type: HTTP related
Operating System: Linux Mandrake 9.2 + cooker
PHP Version: 4.3.4
New Comment:
Cookie names adhere to same rules as PHP variable names. Neither can
contain spaces or periods.
Previous Comments:
------------------------------------------------------------------------
[2004-02-15 20:11:09] silkensedai at online dot fr
Description:
------------
When we set a cookie with the function setcookie() and when the cookie
name have spaces " " or points ".", these characters are replaced by
underscures '_'.
I think that can be fix by urlencodind points (%2E) and spaces (%20).
Reproduce code:
---------------
<?php
setcookie('cookie_name.with spaces', 'value', time()+10000);
?>
<pre><?php print_r($_COOKIE); ?></pre>
<a href='#'>Reload</a>
Expected result:
----------------
===========
First time:
===========
Array
(
)
Reload
============
Second time:
============
Array
(
[cookie_name.with spaces] => value
)
Reload
Actual result:
--------------
===========
First time:
===========
Array
(
)
Reload
============
Second time:
============
Array
(
[cookie_name_with_spaces] => value
)
Reload
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27267&edit=1