|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-08-02 11:02 UTC] derick@php.net
[2004-08-02 11:10 UTC] sas@php.net
[2004-08-02 11:37 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 15:00:01 2025 UTC |
Description: ------------ session_regenerate_id() destroy the false constant : it destroy the constant sid in lower case instead of the constant in upper case... In PHP sources : /* if the SID constant exists, destroy it. */ zend_hash_del(EG(zend_constants), "sid", sizeof("sid")); should maybe be /* if the SID constant exists, destroy it. */ zend_hash_del(EG(zend_constants), "SID", sizeof("SID")); (file session.c) (Please excuse me for my bad english ;-)) Reproduce code: --------------- <?php define('sid', 'essai'); session_start(); session_regenerate_id(); echo SID."\n"; echo sid; ?> Expected result: ---------------- jg9vejq8p3e15lfu34vbouc6j3 essai Actual result: -------------- Notice: Constant SID already defined in D:\essai.php on line 5 Notice: Use of undefined constant sid - assumed 'sid' in D:\essai.php on line 8 sid