cvs: php4 /ext/session session.c
| From: | Sascha Schumann | Date: | Thu, 15 May 2003 13:33:18 +0000 |
| Subject: | cvs: php4 /ext/session session.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-20929@lists.php.net to get a copy of this message | ||
sas Thu May 15 09:33:18 2003 EDT
Modified files:
/php4/ext/session session.c
Log:
Fix the way we create references to (sometimes non-)existing
variables.
Credits go to Rob Richards <rrichards@digarc.com> and Zeev
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.361 php4/ext/session/session.c:1.362
--- php4/ext/session/session.c:1.361 Sun Apr 27 12:18:43 2003
+++ php4/ext/session/session.c Thu May 15 09:33:18 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.361 2003/04/27 16:18:43 stas Exp $ */
+/* $Id: session.c,v 1.362 2003/05/15 13:33:18 sas Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -281,8 +281,10 @@
/* 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 {