Skip to content

Commit

Permalink
Fix Deprecated: memcache_connect(): Passing null to parameter #2... (#88
Browse files Browse the repository at this point in the history
)
  • Loading branch information
remicollet authored Jun 14, 2021
1 parent c615b13 commit f220ea5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/memcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f220ea5

Please sign in to comment.