Skip to content

Commit 583403a

Browse files
committed
ext/sockets: Fix TCP_USER_TIMEOUT range error message
This is a follow-up commit to 3882f55 where all malformed error message in the socket extension in 8.5 has been fixed. This fixed a specific one appears only in the master branch.
1 parent c910d2c commit 583403a

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ PHP NEWS
3030

3131
- Sockets:
3232
. Fixed socket_set_option() validation error messages for UDP_SEGMENT and
33-
SO_LINGER options. (Weilin Du)
33+
TCP_USER_TIMEOUT, and SO_LINGER options. (Weilin Du)
3434

3535
16 Jul 2026, PHP 8.6.0alpha2
3636

ext/sockets/sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2154,7 +2154,7 @@ PHP_FUNCTION(socket_set_option)
21542154

21552155
// TCP_USER_TIMEOUT unsigned int
21562156
if (timeout < 0 || timeout > UINT_MAX) {
2157-
zend_argument_value_error(4, "must be of between 0 and %u", UINT_MAX);
2157+
zend_argument_value_error(4, "must be between 0 and %u", UINT_MAX);
21582158
RETURN_THROWS();
21592159
}
21602160

ext/sockets/tests/socket_setoption_tcpusertimeout_32bit.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ var_dump($retval_3 === $timeout);
2929
socket_close($socket);
3030
?>
3131
--EXPECTF--
32-
socket_setopt(): Argument #4 ($value) must be of between 0 and %d
32+
socket_setopt(): Argument #4 ($value) must be between 0 and %d
3333
bool(true)
3434
bool(true)

ext/sockets/tests/socket_setoption_tcpusertimeout_64bit.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var_dump($retval_3 === $timeout);
3535
socket_close($socket);
3636
?>
3737
--EXPECTF--
38-
socket_setopt(): Argument #4 ($value) must be of between 0 and %d
39-
socket_setopt(): Argument #4 ($value) must be of between 0 and %d
38+
socket_setopt(): Argument #4 ($value) must be between 0 and %d
39+
socket_setopt(): Argument #4 ($value) must be between 0 and %d
4040
bool(true)
4141
bool(true)

0 commit comments

Comments
 (0)