]> granicus.if.org Git - php/commitdiff
- Remove check for ht == NULL in copy_ctor.
authorAndi Gutmans <andi@php.net>
Sat, 12 May 2001 13:55:49 +0000 (13:55 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 12 May 2001 13:55:49 +0000 (13:55 +0000)
  If ht is NULL at this point then we are better off crashing and fixing
  the bug that caused it.

Zend/zend_variables.c

index fb7c1a1642e9bd4d4d2a4620796f28e9ecb43434..d551541a5a21f376cecd8950f6ae49d403b64147 100644 (file)
@@ -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);