summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2002-10-14 00:16:02 +0000
committerWez Furlong <wez@php.net>2002-10-14 00:16:02 +0000
commit483f355d30b0419ea06b53a38eb3a55936fcb375 (patch)
treea5878e4a8752b376d1d5ca4149b886c5a5f621ae
parent2d97f4d4c747dc4b128d5ab54a1e4b51c597634c (diff)
downloadphp-git-483f355d30b0419ea06b53a38eb3a55936fcb375.tar.gz
Fix stream_eof result interpretation (and thus the user-streams test).
-rw-r--r--main/user_streams.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/main/user_streams.c b/main/user_streams.c
index bf7d141126..9ee823f3df 100644
--- a/main/user_streams.c
+++ b/main/user_streams.c
@@ -477,11 +477,12 @@ static size_t php_userstreamop_read(php_stream *stream, char *buf, size_t count
&retval,
0, NULL, 0, NULL TSRMLS_CC);
- if (!(call_result == SUCCESS && retval != NULL && zval_is_true(retval))) {
- if (call_result == FAILURE) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_EOF " is not implemented! Assuming EOF",
- us->wrapper->classname);
- }
+ if (call_result == SUCCESS && retval != NULL && zval_is_true(retval)) {
+ stream->eof = 1;
+ } else if (call_result == FAILURE) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING,
+ "%s::" USERSTREAM_EOF " is not implemented! Assuming EOF",
+ us->wrapper->classname);
stream->eof = 1;
}