Skip to content

Fixes CI failure introduced by #23345 - #23382

Merged
devnexen merged 1 commit into
php:masterfrom
NickSdot:fix/assertion-23345
Aug 19, 2026
Merged

Fixes CI failure introduced by #23345#23382
devnexen merged 1 commit into
php:masterfrom
NickSdot:fix/assertion-23345

Conversation

@NickSdot

@NickSdot NickSdot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

@NickSdot
NickSdot requested a review from devnexen as a code owner August 19, 2026 14:41
@LamentXU123

Copy link
Copy Markdown
Member

Also cc @lacatoire

@@ -0,0 +1,26 @@
--TEST--

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--- a/ext/sockets/tests/socket_cmsg_space_overflow_64bit.phpt
+++ b/ext/sockets/tests/socket_cmsg_space_num_range_64bit.phpt
@@ -7,19 +7,14 @@
 if (PHP_INT_SIZE < 8) {
     die('skip 64-bit only');
 }
-if (PHP_OS_FAMILY === 'Windows') {
-    die('skip SCM_RIGHTS not available on Windows');
-}
-if (!defined('SCM_RIGHTS')) {
-    die('skip SCM_RIGHTS not defined on this platform');
-}
 ?>
 --FILE--
 <?php
+// $num is range checked before the level/type pair is looked up
 try {
-    socket_cmsg_space(SOL_SOCKET, SCM_RIGHTS, PHP_INT_MAX);
+    socket_cmsg_space(SOL_SOCKET, 0, PHP_INT_MAX);
 } catch (Throwable $e) {
-    echo $e::class, ': ', $e->getMessage(), "\n";
+    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
 }
 ?>
 --EXPECT--

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe do not pay attention to the last line change though now I realise ..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Amended; forgot to add co-authored, feel free on merge.

@NickSdot
NickSdot force-pushed the fix/assertion-23345 branch from 8c9d7ad to d46665d Compare August 19, 2026 15:31
@devnexen
devnexen merged commit 6d3c5c6 into php:master Aug 19, 2026
15 of 18 checks passed
@devnexen

Copy link
Copy Markdown
Member

Thanks !

@NickSdot
NickSdot deleted the fix/assertion-23345 branch August 19, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants