mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.0'
* PHP-8.0: Fix php_pgsql_fd_cast() wrt. php_stream_can_cast()
This commit is contained in:
commit
950bb84c7e
1 changed files with 4 additions and 3 deletions
|
@ -4138,16 +4138,17 @@ static int php_pgsql_fd_cast(php_stream *stream, int cast_as, void **ret) /* {{{
|
|||
switch (cast_as) {
|
||||
case PHP_STREAM_AS_FD_FOR_SELECT:
|
||||
case PHP_STREAM_AS_FD:
|
||||
case PHP_STREAM_AS_SOCKETD:
|
||||
if (ret) {
|
||||
case PHP_STREAM_AS_SOCKETD: {
|
||||
int fd_number = PQsocket(pgsql);
|
||||
if (fd_number == -1) {
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
*(php_socket_t *)ret = fd_number;
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
return SUCCESS;
|
||||
ZEND_FALLTHROUGH;
|
||||
default:
|
||||
return FAILURE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue