]> granicus.if.org Git - php/commitdiff
Fixed bug #11643
authorIlia Alshanetsky <iliaa@php.net>
Thu, 26 Sep 2002 18:12:27 +0000 (18:12 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 26 Sep 2002 18:12:27 +0000 (18:12 +0000)
ext/session/session.c

index ab276fdbd9c303882b1defbdc2506f0dd67ddeeb..45c415046a1570413aada352377ba44869c64035 100644 (file)
@@ -826,6 +826,7 @@ PHPAPI void php_session_start(TSRMLS_D)
        int module_number = PS(module_number);
        int nrand;
        int lensess;
+       zend_constant *c;
 
        PS(apply_trans_sid) = PS(use_trans_sid);
 
@@ -919,7 +920,11 @@ PHPAPI void php_session_start(TSRMLS_D)
                php_session_send_cookie(TSRMLS_C);
        }
 
-
+       /* check if SID constant exists, if it does destroy it. */
+       if (zend_hash_find(EG(zend_constants), "sid", 4, (void **) &c) != FAILURE) {
+               zend_hash_del(EG(zend_constants), "sid", 4);
+       }
+       
        if (define_sid) {
                smart_str var = {0};