mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-7.4'
This commit is contained in:
commit
a748d27c9b
1 changed files with 6 additions and 2 deletions
|
@ -698,12 +698,17 @@ static ssize_t php_userstreamop_read(php_stream *stream, char *buf, size_t count
|
||||||
/* since the user stream has no way of setting the eof flag directly, we need to ask it if we hit eof */
|
/* since the user stream has no way of setting the eof flag directly, we need to ask it if we hit eof */
|
||||||
|
|
||||||
ZVAL_STRINGL(&func_name, USERSTREAM_EOF, sizeof(USERSTREAM_EOF)-1);
|
ZVAL_STRINGL(&func_name, USERSTREAM_EOF, sizeof(USERSTREAM_EOF)-1);
|
||||||
|
|
||||||
call_result = call_user_function(NULL,
|
call_result = call_user_function(NULL,
|
||||||
Z_ISUNDEF(us->object)? NULL : &us->object,
|
Z_ISUNDEF(us->object)? NULL : &us->object,
|
||||||
&func_name,
|
&func_name,
|
||||||
&retval,
|
&retval,
|
||||||
0, NULL);
|
0, NULL);
|
||||||
|
zval_ptr_dtor(&func_name);
|
||||||
|
|
||||||
|
if (EG(exception)) {
|
||||||
|
stream->eof = 1;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF && zval_is_true(&retval)) {
|
if (call_result == SUCCESS && Z_TYPE(retval) != IS_UNDEF && zval_is_true(&retval)) {
|
||||||
stream->eof = 1;
|
stream->eof = 1;
|
||||||
|
@ -716,7 +721,6 @@ static ssize_t php_userstreamop_read(php_stream *stream, char *buf, size_t count
|
||||||
}
|
}
|
||||||
|
|
||||||
zval_ptr_dtor(&retval);
|
zval_ptr_dtor(&retval);
|
||||||
zval_ptr_dtor(&func_name);
|
|
||||||
|
|
||||||
return didread;
|
return didread;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue