- zval *rv = NULL;
-
- zend_call_method_with_1_params(zconv, NULL, NULL, "converttostring", &rv, *zpp);
- convert_to_string(rv);
- p->param.strings[index] = Z_STRVAL_P(rv);
- zend_hash_next_index_insert(&p->param.dtor, (void *) &rv, sizeof(zval *), NULL);
+ zval *ztype, *rv = NULL;
+
+ MAKE_STD_ZVAL(ztype);
+ ZVAL_LONG(ztype, type);
+ zend_call_method_with_2_params(zconv, NULL, NULL, "converttostring", &rv, *zpp, ztype);
+ zval_ptr_dtor(&ztype);
+ if (rv) {
+ convert_to_string(rv);
+ p->param.strings[index] = Z_STRVAL_P(rv);
+ zend_hash_next_index_insert(&p->param.dtor, (void *) &rv, sizeof(zval *), NULL);
+ }