Skip to content

Commit 472a774

Browse files
committed
Fix phpGH-20603 issue on windows 32 bits.
the timeout needed to be unsigned.
1 parent 9435c06 commit 472a774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/ftp/php_ftp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ PHP_FUNCTION(ftp_connect)
158158
RETURN_THROWS();
159159
}
160160

161-
const zend_long timeoutmax = (zend_long)((double) PHP_TIMEOUT_ULL_MAX / 1000000.0);
161+
const zend_ulong timeoutmax = (zend_ulong)((double) PHP_TIMEOUT_ULL_MAX / 1000000.0);
162162

163163
if (timeout_sec <= 0) {
164164
zend_argument_value_error(3, "must be greater than 0");
165165
RETURN_THROWS();
166166
}
167167

168168
if (timeout_sec >= timeoutmax) {
169-
zend_argument_value_error(3, "must be less than " ZEND_LONG_FMT, timeoutmax);
169+
zend_argument_value_error(3, "must be less than " ZEND_ULONG_FMT, timeoutmax);
170170
RETURN_THROWS();
171171
}
172172

0 commit comments

Comments
 (0)