diff options
author | Andi Gutmans <andi@php.net> | 2004-07-10 07:46:17 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2004-07-10 07:46:17 +0000 |
commit | e5cfb1d05cf10fa694f231dae33ccb03ab8f74c8 (patch) | |
tree | 65252174d1cad948046778306ce3ba09d3d78682 /Zend/zend_variables.c | |
parent | 41b639fffebd099699cdf9c3231539d72602ce38 (diff) | |
download | php-git-e5cfb1d05cf10fa694f231dae33ccb03ab8f74c8.tar.gz |
- Better stability during premature shutdown of request startup
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r-- | Zend/zend_variables.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index 51f51f8d8c..e6fbd5342c 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -140,14 +140,16 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC) case IS_CONSTANT_ARRAY: { zval *tmp; HashTable *original_ht = zvalue->value.ht; + HashTable *tmp_ht = NULL; TSRMLS_FETCH(); if (zvalue->value.ht == &EG(symbol_table)) { return SUCCESS; /* do nothing */ } - ALLOC_HASHTABLE_REL(zvalue->value.ht); - zend_hash_init(zvalue->value.ht, 0, NULL, ZVAL_PTR_DTOR, 0); - zend_hash_copy(zvalue->value.ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); + ALLOC_HASHTABLE_REL(tmp_ht); + zend_hash_init(tmp_ht, 0, NULL, ZVAL_PTR_DTOR, 0); + zend_hash_copy(tmp_ht, original_ht, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); + zvalue->value.ht = tmp_ht; } break; case IS_OBJECT: |