mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
ecc9588d0c
As of PHP 8.0.0, failing `zend_fetch_resource_ex()` throws a TypeError, so we cannot simply skip non resources in the `$read`, `$write` and `$except` arrays. Instead we bail out. Since these arrays are already checked in `php_sock_array_to_fd_set()`, we remove the additional check in `php_sock_array_from_fd_set()`.
18 lines
372 B
PHP
18 lines
372 B
PHP
--TEST--
|
|
socket_select() error conditions
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded('sockets')) die('skip socket extension not available');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$r = $w = $e = ['no resource'];
|
|
try {
|
|
socket_select($r, $w, $e, 1);
|
|
} catch (TypeError $ex) {
|
|
echo $ex->getMessage(), PHP_EOL;
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
socket_select(): supplied argument is not a valid Socket resource
|