aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Stanley Cheung <stanleycheung@google.com>2016-02-16 09:45:51 -0800
committerGravatar Stanley Cheung <stanleycheung@google.com>2016-02-16 09:45:51 -0800
commitf77a4ad9f7d0e84ee418165c4c9a604ea89780f9 (patch)
tree85ca55f3cfd453297a79355c094bf3d92b617555
parentb91f0f27c5cfd92b5f9358fe54f556fec6005d22 (diff)
channel constructor the array is required
-rw-r--r--src/php/ext/grpc/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c
index 97e8cc1a63..2c64b9122c 100644
--- a/src/php/ext/grpc/channel.c
+++ b/src/php/ext/grpc/channel.c
@@ -141,8 +141,8 @@ PHP_METHOD(Channel, __construct) {
HashTable *array_hash;
zval **creds_obj = NULL;
wrapped_grpc_channel_credentials *creds = NULL;
- /* "s|a" == 1 string, 1 optional array */
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|a", &target,
+ /* "sa" == 1 string, 1 array */
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sa", &target,
&target_length, &args_array) == FAILURE) {
zend_throw_exception(spl_ce_InvalidArgumentException,
"Channel expects a string and an array", 1 TSRMLS_CC);