diff options
Diffstat (limited to 'main/streams/plain_wrapper.c')
-rw-r--r-- | main/streams/plain_wrapper.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index 0373cc4c94..a63c225a0d 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -358,7 +358,9 @@ static ssize_t php_stdiop_write(php_stream *stream, const char *buf, size_t coun /* TODO: Should this be treated as a proper error or not? */ return bytes_written; } - php_error_docref(NULL, E_NOTICE, "Write of %zu bytes failed with errno=%d %s", count, errno, strerror(errno)); + if (!(stream->flags & PHP_STREAM_FLAG_SUPPRESS_ERRORS)) { + php_error_docref(NULL, E_NOTICE, "Write of %zu bytes failed with errno=%d %s", count, errno, strerror(errno)); + } } return bytes_written; } else { @@ -426,7 +428,9 @@ static ssize_t php_stdiop_read(php_stream *stream, char *buf, size_t count) } else if (errno == EINTR) { /* TODO: Should this be treated as a proper error or not? */ } else { - php_error_docref(NULL, E_NOTICE, "Read of %zu bytes failed with errno=%d %s", count, errno, strerror(errno)); + if (!(stream->flags & PHP_STREAM_FLAG_SUPPRESS_ERRORS)) { + php_error_docref(NULL, E_NOTICE, "Read of %zu bytes failed with errno=%d %s", count, errno, strerror(errno)); + } /* TODO: Remove this special-case? */ if (errno != EBADF) { |