mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Allow filtered streams to be casted as fd for select
This removes the artificial limitation that is not necessary. The fact that some streams can have some data buffered is not a problem because the similar situation is already present for OpenSSL streams where OpenSSL can internally buffer data for the unprocessed part of the record. Closes GH-20540
This commit is contained in:
@@ -297,7 +297,7 @@ PHPAPI zend_result _php_stream_cast(php_stream *stream, int castas, void **ret,
|
||||
}
|
||||
}
|
||||
|
||||
if (php_stream_is_filtered(stream)) {
|
||||
if (php_stream_is_filtered(stream) && castas != PHP_STREAM_AS_FD_FOR_SELECT) {
|
||||
if (show_err) {
|
||||
php_error_docref(NULL, E_WARNING, "Cannot cast a filtered stream on this system");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user