Let $GLOBALS actually work...

This commit is contained in:
Zeev Suraski 1999-09-03 01:34:52 +00:00
parent 2521b5550a
commit 69fa5199bc

View File

@ -124,9 +124,11 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
HashTable *original_ht = zvalue->value.ht;
ELS_FETCH();
if (!zvalue->value.ht || zvalue->value.ht==&EG(symbol_table)) {
if (!zvalue->value.ht) {
var_reset(zvalue);
return FAILURE;
} else if (zvalue->value.ht==&EG(symbol_table)) {
return SUCCESS; /* do nothing */
}
zvalue->value.ht = (HashTable *) emalloc_rel(sizeof(HashTable));
zend_hash_init(zvalue->value.ht, 0, NULL, PVAL_PTR_DTOR, 0);