mirror of
https://github.com/php/php-src.git
synced 2024-09-23 10:57:26 +00:00
Fixed stream_cast
This commit is contained in:
parent
12478f7287
commit
1a828f42ea
@ -492,6 +492,7 @@ PHP_FUNCTION(stream_get_meta_data)
|
||||
array_init(return_value);
|
||||
|
||||
if (!ZVAL_IS_UNDEF(&stream->wrapperdata)) {
|
||||
Z_ADDREF_P(&stream->wrapperdata);
|
||||
add_assoc_zval(return_value, "wrapper_data", &stream->wrapperdata);
|
||||
}
|
||||
if (stream->wrapper) {
|
||||
@ -779,7 +780,6 @@ PHP_FUNCTION(stream_select)
|
||||
FD_ZERO(&efds);
|
||||
|
||||
if (r_array != NULL) {
|
||||
r_array = Z_REFVAL_P(r_array);
|
||||
set_count = stream_array_to_fd_set(r_array, &rfds, &max_fd TSRMLS_CC);
|
||||
if (set_count > max_set_count)
|
||||
max_set_count = set_count;
|
||||
@ -787,7 +787,6 @@ PHP_FUNCTION(stream_select)
|
||||
}
|
||||
|
||||
if (w_array != NULL) {
|
||||
w_array = Z_REFVAL_P(w_array);
|
||||
set_count = stream_array_to_fd_set(w_array, &wfds, &max_fd TSRMLS_CC);
|
||||
if (set_count > max_set_count)
|
||||
max_set_count = set_count;
|
||||
@ -795,7 +794,6 @@ PHP_FUNCTION(stream_select)
|
||||
}
|
||||
|
||||
if (e_array != NULL) {
|
||||
e_array = Z_REFVAL_P(e_array);
|
||||
set_count = stream_array_to_fd_set(e_array, &efds, &max_fd TSRMLS_CC);
|
||||
if (set_count > max_set_count)
|
||||
max_set_count = set_count;
|
||||
|
@ -1510,7 +1510,7 @@ static int php_userstreamop_cast(php_stream *stream, int castas, void **retptr T
|
||||
us->wrapper->classname);
|
||||
break;
|
||||
}
|
||||
if (Z_TYPE(retval) != IS_UNDEF || !zend_is_true(&retval TSRMLS_CC)) {
|
||||
if (ZVAL_IS_UNDEF(&retval) || !zend_is_true(&retval TSRMLS_CC)) {
|
||||
break;
|
||||
}
|
||||
php_stream_from_zval_no_verify(intstream, &retval);
|
||||
|
Loading…
Reference in New Issue
Block a user