From: Andi Gutmans Date: Sat, 12 May 2001 13:55:49 +0000 (+0000) Subject: - Remove check for ht == NULL in copy_ctor. X-Git-Tag: PRE_GRANULAR_GARBAGE_FIX~459 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eadaf3eb7a24a7475cca68c350210fc9f74226c0;p=php - Remove check for ht == NULL in copy_ctor. If ht is NULL at this point then we are better off crashing and fixing the bug that caused it. --- diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c index fb7c1a1642..d551541a5a 100644 --- a/Zend/zend_variables.c +++ b/Zend/zend_variables.c @@ -122,10 +122,7 @@ ZEND_API int _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC) HashTable *original_ht = zvalue->value.ht; ELS_FETCH(); - if (!zvalue->value.ht) { - var_reset(zvalue); - return FAILURE; - } else if (zvalue->value.ht==&EG(symbol_table)) { + if (zvalue->value.ht == &EG(symbol_table)) { return SUCCESS; /* do nothing */ } ALLOC_HASHTABLE_REL(zvalue->value.ht);