[GIT-PULLS] [php-src] PR #23345: ext/sockets: socket_cmsg_space() returns int, never null
[email protected] (lacatoire)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <zgumYgX3ZRJZoTwf5vXXecUVB4JUnHmsIRaYNAeQklM@main.internal.php.net> |
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.