Blob Blame History Raw
From d20c716286034a0d21cd5505a046351aceea4cbc Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 10 Jun 2021 14:21:03 +0200
Subject: [PATCH] Fix  Deprecated: memcache_connect(): Passing null to
 parameter #2...

---
 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;
 	}