]> granicus.if.org Git - php/commitdiff
@- Made $HTTP_SESSION_VARS['foo'] and $foo be references to the same value
authorAndrei Zmievski <andrei@php.net>
Tue, 22 May 2001 17:55:07 +0000 (17:55 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 22 May 2001 17:55:07 +0000 (17:55 +0000)
@  when register_globals is on. (Andrei)

ext/session/session.c

index 9be12ff7e53ca3fe23974c387ecca6fa17e1255b..c83e1279b280c76d12e7147ebc16d64dcae03ced 100644 (file)
@@ -245,9 +245,9 @@ void php_set_session_var(char *name, size_t namelen, zval *state_val PSLS_DC)
                        REPLACE_ZVAL_VALUE(old_symbol,state_val_copy,0);
                        FREE_ZVAL(state_val_copy);
 
-                       zend_set_hash_symbol(*old_symbol, name, namelen, 0, 1, Z_ARRVAL_P(PS(http_session_vars)));
+                       zend_set_hash_symbol(*old_symbol, name, namelen, 1, 1, Z_ARRVAL_P(PS(http_session_vars)));
                } else {
-                       zend_set_hash_symbol(state_val_copy, name, namelen, 0, 2, Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
+                       zend_set_hash_symbol(state_val_copy, name, namelen, 1, 2, Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
                }
        } else {
                zend_set_hash_symbol(state_val_copy, name, namelen, 0, 1, Z_ARRVAL_P(PS(http_session_vars)));