	tidy_add_default_properties(newobj, is_node TSRMLS_CC);
}

static int _php_tidy_apply_config_array(TidyDoc doc, HashTable *ht_options TSRMLS_DC)
{
	char *opt_name = NULL;
	zval **opt_val;
	ulong opt_indx;
	
	for (zend_hash_internal_pointer_reset(ht_options);
		 zend_hash_get_current_data(ht_options, (void **)&opt_val) == SUCCESS;
		 zend_hash_move_forward(ht_options)) {
		
		if(zend_hash_get_current_key(ht_options, &opt_name, &opt_indx, FALSE) == FAILURE) {
			php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not retrieve key from option array");
			return FAILURE;
		}

		if(opt_name) {
			_php_tidy_set_tidy_opt(doc, opt_name, *opt_val TSRMLS_CC);
			opt_name = NULL;
		}
					
	}
	tidy_add_default_properties(newobj, is_node TSRMLS_CC);
}

static int _php_tidy_apply_config_array(TidyDoc doc, HashTable *ht_options TSRMLS_DC)
{
	char *opt_name = NULL;
	zval **opt_val;
	ulong opt_indx;
	
	for (zend_hash_internal_pointer_reset(ht_options);
		 zend_hash_get_current_data(ht_options, (void **)&opt_val) == SUCCESS;
		 zend_hash_move_forward(ht_options)) {
		
		if(zend_hash_get_current_key(ht_options, &opt_name, &opt_indx, FALSE) == FAILURE) {
			php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not retrieve key from option array");
			return FAILURE;
		}

		if(opt_name) {
			_php_tidy_set_tidy_opt(doc, opt_name, *opt_val TSRMLS_CC);
			opt_name = NULL;
		}
					
	}