com php-src: Convert the $ttl parameter of ldap_exop_refres h() to int: ext/ldap/ldap.c ext/ldap/ldap.stu b.php
| From: | Máté Kocsis | Date: | Sun, 02 Aug 2020 22:38:59 +0000 |
| Subject: | com php-src: Convert the $ttl parameter of ldap_exop_refres h() to int: ext/ldap/ldap.c ext/ldap/ldap.stu b.php | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112488@lists.php.net to get a copy of this message | ||
Commit: 156c1806db952d6448b9807aa59ab0c515d241bc
Author: Máté Kocsis <kocsismate@woohoolabs.com> Mon, 3 Aug 2020 00:38:59 +0200
Parents: 00743f3faed704754af34f482ca7540e560a54b7
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=156c1806db952d6448b9807aa59ab0c515d241bc
Log:
Convert the $ttl parameter of ldap_exop_refresh() to int
Changed paths:
M ext/ldap/ldap.c
M ext/ldap/ldap.stub.php
Diff:
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 2983b857b6..cb0ab4f02c 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -4314,14 +4314,15 @@ PHP_FUNCTION(ldap_exop_whoami)
/* {{{ DDS refresh extended operation */
PHP_FUNCTION(ldap_exop_refresh)
{
- zval *link, *ttl;
+ zval *link;
+ zend_long ttl;
struct berval ldn;
ber_int_t lttl;
ber_int_t newttl;
ldap_linkdata *ld;
int rc;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsz", &link, &ldn.bv_val,
&ldn.bv_len, &ttl) != SUCCESS) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rsl", &link, &ldn.bv_val,
&ldn.bv_len, &ttl) != SUCCESS) {
RETURN_THROWS();
}
@@ -4329,7 +4330,7 @@ PHP_FUNCTION(ldap_exop_refresh)
RETURN_THROWS();
}
- lttl = (ber_int_t)zval_get_long(ttl);
+ lttl = (ber_int_t) ttl;
rc = ldap_refresh_s(ld->link, &ldn, lttl, &newttl, NULL, NULL);
if (rc != LDAP_SUCCESS ) {
diff --git a/ext/ldap/ldap.stub.php b/ext/ldap/ldap.stub.php
index b60d46a70b..8a87fa501f 100644
--- a/ext/ldap/ldap.stub.php
+++ b/ext/ldap/ldap.stub.php
@@ -305,7 +305,7 @@ function ldap_exop_whoami($link): string|bool {}
#ifdef HAVE_LDAP_REFRESH_S
/** @param resource $link */
-function ldap_exop_refresh($link, string $dn, $ttl): int|false {}
+function ldap_exop_refresh($link, string $dn, int $ttl): int|false {}
#endif