revert unnecessary change

pull/5225/head
Stanley Cheung 9 years ago
parent cccf9295e6
commit b91f0f27c5
  1. 12
      src/php/ext/grpc/call.c

@ -125,9 +125,15 @@ zval *grpc_parse_metadata_array(grpc_metadata_array *metadata_array) {
memcpy(str_val, elem->value, elem->value_length); memcpy(str_val, elem->value, elem->value_length);
if (zend_hash_find(array_hash, str_key, key_len, (void **)data) == if (zend_hash_find(array_hash, str_key, key_len, (void **)data) ==
SUCCESS) { SUCCESS) {
zend_throw_exception(zend_exception_get_default(), if (Z_TYPE_P(*data) != IS_ARRAY) {
"Metadata hash somehow contains wrong types.", zend_throw_exception(zend_exception_get_default(),
1 TSRMLS_CC); "Metadata hash somehow contains wrong types.",
1 TSRMLS_CC);
efree(str_key);
efree(str_val);
return NULL;
}
add_next_index_stringl(*data, str_val, elem->value_length, false);
} else { } else {
MAKE_STD_ZVAL(inner_array); MAKE_STD_ZVAL(inner_array);
array_init(inner_array); array_init(inner_array);

Loading…
Cancel
Save