diff options
author | 2016-02-12 16:37:19 -0800 | |
---|---|---|
committer | 2016-02-12 16:37:19 -0800 | |
commit | cccf9295e6e6d2da8c8c283b5c1ee0001975e525 (patch) | |
tree | bfd0cf2b6aab8d0d57565b202c3ac401b7998f04 /src/php/ext/grpc/call.c | |
parent | 2ba7885f5c9af63f6cea9faa7351ca0b54331b85 (diff) |
php: add more unit tests to improve code coverage
Diffstat (limited to 'src/php/ext/grpc/call.c')
-rw-r--r-- | src/php/ext/grpc/call.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index 7ba14a38d8..4b4336666c 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -125,15 +125,9 @@ zval *grpc_parse_metadata_array(grpc_metadata_array *metadata_array) { memcpy(str_val, elem->value, elem->value_length); if (zend_hash_find(array_hash, str_key, key_len, (void **)data) == SUCCESS) { - if (Z_TYPE_P(*data) != IS_ARRAY) { - zend_throw_exception(zend_exception_get_default(), - "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); + zend_throw_exception(zend_exception_get_default(), + "Metadata hash somehow contains wrong types.", + 1 TSRMLS_CC); } else { MAKE_STD_ZVAL(inner_array); array_init(inner_array); |