[php-src] PR #23345: ext/sockets: socket_cmsg_space() returns int, never null
| From: | lacatoire | Date: | Tue, 18 Aug 2026 10:15:09 +0000 |
| Subject: | [php-src] PR #23345: ext/sockets: socket_cmsg_space() returns int, never null | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37962@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/23345
Author: lacatoire
socket_cmsg_space() is declared ?int, but the nullable return is
unreachable.
The stub was written when each failure was a php_error_docref() warning followed by a
bare return;, which yields null. PHP 8.0 converted those to ValueError,
removing every null exit path. The declaration was not updated.
Every exit is now either RETURN_LONG or RETURN_THROWS. Narrowing
?int to int is a subtype change; no valid call is affected.