From f220ea50be2b398d166ecf76aabb85bf4849fc62 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 14 Jun 2021 15:35:14 +0200 Subject: [PATCH] Fix Deprecated: memcache_connect(): Passing null to parameter #2... (#88) --- src/memcache.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/memcache.c b/src/memcache.c index 3048819..2cb675b 100644 --- a/src/memcache.c +++ b/src/memcache.c @@ -1319,8 +1319,9 @@ static void php_mmc_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool persistent) size_t host_len; zend_long tcp_port = MEMCACHE_G(default_port); double timeout = MMC_DEFAULT_TIMEOUT; + zend_bool null_port; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|ld", &host, &host_len, &tcp_port, &timeout) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l!d", &host, &host_len, &tcp_port, &null_port, &timeout) == FAILURE) { return; }