summaryrefslogtreecommitdiff
path: root/ext/session/session.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-05-15 13:33:18 +0000
committerSascha Schumann <sas@php.net>2003-05-15 13:33:18 +0000
commit289ad3960e3851872cb509fab42d9121d13ae7d1 (patch)
tree67e06c865a208f9baaa8cdea4096a7279897df02 /ext/session/session.c
parentb9215a15388426980601eb267630d07d45b08108 (diff)
downloadphp-git-289ad3960e3851872cb509fab42d9121d13ae7d1.tar.gz
Fix the way we create references to (sometimes non-)existing
variables. Credits go to Rob Richards <rrichards@digarc.com> and Zeev
Diffstat (limited to 'ext/session/session.c')
-rw-r--r--ext/session/session.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/session/session.c b/ext/session/session.c
index 04fa63a916..7bc6725f1e 100644
--- a/ext/session/session.c
+++ b/ext/session/session.c
@@ -281,8 +281,10 @@ void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
/* The next call will increase refcount by NR_OF_SYM_TABLES==2 */
zend_set_hash_symbol(empty_var, name, namelen, 1, 2, Z_ARRVAL_P(PS(http_session_vars)), &EG(symbol_table));
} else if (sym_global == NULL) {
+ SEPARATE_ZVAL_IF_NOT_REF(sym_track);
zend_set_hash_symbol(*sym_track, name, namelen, 1, 1, &EG(symbol_table));
} else if (sym_track == NULL) {
+ SEPARATE_ZVAL_IF_NOT_REF(sym_global);
zend_set_hash_symbol(*sym_global, name, namelen, 1, 1, Z_ARRVAL_P(PS(http_session_vars)));
}
} else {