1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Fix GH-20603 issue on windows 32 bits.

the timeout needed to be unsigned.

close GH-20634

(cherry picked from commit ff51ac161d)
This commit is contained in:
David Carlier
2025-12-02 19:04:36 +00:00
committed by Jakub Zelenka
parent 16ce2ff13f
commit 08bd4909fe

View File

@@ -158,7 +158,7 @@ PHP_FUNCTION(ftp_connect)
RETURN_THROWS();
}
const zend_long timeoutmax = (zend_long)((double) PHP_TIMEOUT_ULL_MAX / 1000000.0);
const uint64_t timeoutmax = (uint64_t)((double) PHP_TIMEOUT_ULL_MAX / 1000000.0);
if (timeout_sec <= 0) {
zend_argument_value_error(3, "must be greater than 0");
@@ -166,7 +166,7 @@ PHP_FUNCTION(ftp_connect)
}
if (timeout_sec >= timeoutmax) {
zend_argument_value_error(3, "must be less than " ZEND_LONG_FMT, timeoutmax);
zend_argument_value_error(3, "must be less than " ZEND_ULONG_FMT, timeoutmax);
RETURN_THROWS();
}