diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 6456cf6f813e4..938393f410e70 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -214,8 +214,8 @@ PHP_FUNCTION(curl_multi_select) mh = Z_CURL_MULTI_P(z_mh); - if (!(timeout >= 0.0 && timeout <= ((double)INT_MAX / 1000.0))) { - zend_argument_value_error(2, "must be between 0 and %d", (int)ceilf((double)INT_MAX / 1000)); + if (!(timeout >= 0.0 && timeout <= (INT_MAX / 1000.0))) { + zend_argument_value_error(2, "must be between 0 and %f", INT_MAX / 1000.0); RETURN_THROWS(); } diff --git a/ext/curl/tests/gh15547.phpt b/ext/curl/tests/gh15547.phpt index cee3f00cdb9f8..489fdd0b999a0 100644 --- a/ext/curl/tests/gh15547.phpt +++ b/ext/curl/tests/gh15547.phpt @@ -24,6 +24,6 @@ $mh = curl_multi_init(); var_dump(curl_multi_select($mh, 1000000)); ?> --EXPECTF-- -curl_multi_select(): Argument #2 ($timeout) must be between %d and %d -curl_multi_select(): Argument #2 ($timeout) must be between %d and %d +curl_multi_select(): Argument #2 ($timeout) must be between %d and %f +curl_multi_select(): Argument #2 ($timeout) must be between %d and %f int(0)