Skip to content

Fix GH-19798: XP_SOCKET XP_SSL: Incorrect condition for Win - #19881

Closed
bukka wants to merge 1 commit into
php:PHP-8.3from
bukka:stream_gh19798_sock_err_check
Closed

bukka wants to merge 1 commit into
php:PHP-8.3from
bukka:stream_gh19798_sock_err_check

Conversation

@bukka

@bukka bukka commented Sep 19, 2025 •

Copy link
Copy Markdown
Member

This fixes incorrect type conversion and subsequent check for Windows where returned socket is not an int.

It should be noted that this is not really an issue as previous int would get negative so the check should still work. The issue actually happens only in master (PHP 8.5) where refactoring has been done and the type changed.

This targets 8.3 because this sort of casting is implementation defined behaviour (in terms of signess) so it's better to fix it even though there should not be an issue with it.

@bukka
bukka changed the base branch from master to PHP-8.3 September 19, 2025 10:39
This fixes incorrect type conversion and subsequent check for Windows
where returned socket is not an int.

It should be noted that this is not really an issue as previous int
would get negative so the check should still work. The issue actually
happens only in master (PHP 8.5) where refactoring has been done and the
type changed.

Closes phpGH-19881
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.

1 participant