Repository navigation
Conversation
Member
diff --git a/ext/sockets/tests/socket_sendrecvmsg_error.phpt b/ext/sockets/tests/socket_sendrecvmsg_error.phpt
index 16f77a1e763..9d7b1b63c6c 100644
--- a/ext/sockets/tests/socket_sendrecvmsg_error.phpt
+++ b/ext/sockets/tests/socket_sendrecvmsg_error.phpt
@@ -7,8 +7,9 @@
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
socket_sendmsg($socket, [], -1);
+$tcp = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
$message = ['controllen' => 1];
-socket_recvmsg($socket, $message, -1);
+socket_recvmsg($tcp, $message, 0);
?>
--EXPECTF-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
socket_recvmsg()stores a failure only in the global last error and always warns, sosocket_last_error($socket)does not see it and a non-blocking socket warns for EAGAIN. It now usesPHP_SOCKET_ERROR()likesocket_sendmsg(),socket_recv()andsocket_recvfrom().To reproduce
Before:
After: