From: Sascha Schumann Date: Thu, 15 May 2003 13:33:18 +0000 (+0000) Subject: Fix the way we create references to (sometimes non-)existing X-Git-Tag: RELEASE_1_0_2~801 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=289ad3960e3851872cb509fab42d9121d13ae7d1;p=php Fix the way we create references to (sometimes non-)existing variables. Credits go to Rob Richards and Zeev --- 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 {