|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-02-10 08:00 UTC] laruence@php.net
-Status: Open
+Status: Not a bug
[2012-02-10 08:00 UTC] laruence@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 14:00:01 2025 UTC |
Description: ------------ My application supports user IDs with underscore or dot between alphanumeric string. The users preferences are stored in cookies. The cookie key is prefixed with the user id. It is observed that the dots in the userIDs are getting converted to underscores in the setCookie method. The same replacement doesn't appear to happen during retrieve and hence the application fails to detect the preferences. Sample Script: <?php setcookie("test.cookie.error","something"); print_r($_COOKIE); ?> Output Array ( [test_cookie_error] => something ) Test script: --------------- <?php setcookie("test.cookie.error","something"); print_r($_COOKIE); ?> Expected result: ---------------- Array ( [test.cookie.error] => something ) Actual result: -------------- Array ( [test_cookie_error] => something )