duplicate keys). (Dmitry)
- Fixed bug #43817 (opendir() fails on Windows directories with parent
directory unaccessible). (Dmitry)
+- Fixed bug #43782 (feof() does not detect timeout on socket). (David Soria Parra)
- Fixed bug #43008 (php://filter uris ignore url encoded filternames and can't
handle slashes). (Arnaud)
- Fixed bug #35980 (touch() works on files but not on directories). (Pierre)
/* use the configured timeout when checking eof */
if (!stream->eof && PHP_STREAM_OPTION_RETURN_ERR ==
php_stream_set_option(stream, PHP_STREAM_OPTION_CHECK_LIVENESS,
- 0, NULL)) {
+ -1, NULL)) {
stream->eof = 1;
}
if (sock->socket == -1) {
alive = 0;
- } else if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
- if (0 == recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
+ } else {
+ if (php_pollfd_for(sock->socket, PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
+ if (0 == recv(sock->socket, &buf, sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
+ alive = 0;
+ }
+ } else {
alive = 0;
}
}