Skip to content
Snippets Groups Projects
Commit e4b419eb authored by Jan Tattermusch's avatar Jan Tattermusch
Browse files

Merge pull request #5805 from stanley-cheung/php-fix-arg-type

PHP: return channel arg type
parents 6b0cb778 7895da25
No related branches found
No related tags found
No related merge requests found
......@@ -110,9 +110,11 @@ void php_grpc_read_args_array(zval *args_array, grpc_channel_args *args) {
switch (Z_TYPE_P(*data)) {
case IS_LONG:
args->args[args_index].value.integer = (int)Z_LVAL_P(*data);
args->args[args_index].type = GRPC_ARG_INTEGER;
break;
case IS_STRING:
args->args[args_index].value.string = Z_STRVAL_P(*data);
args->args[args_index].type = GRPC_ARG_STRING;
break;
default:
zend_throw_exception(spl_ce_InvalidArgumentException,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment