summaryrefslogtreecommitdiff
path: root/ext/standard/streamsfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/streamsfuncs.c')
-rw-r--r--ext/standard/streamsfuncs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c
index cdb420c0f7..426849e81e 100644
--- a/ext/standard/streamsfuncs.c
+++ b/ext/standard/streamsfuncs.c
@@ -443,6 +443,7 @@ PHP_FUNCTION(stream_copy_to_stream)
php_stream *src, *dest;
zval *zsrc, *zdest;
long maxlen = PHP_STREAM_COPY_ALL, pos = 0;
+ size_t ret;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rr|ll", &zsrc, &zdest, &maxlen, &pos) == FAILURE) {
RETURN_FALSE;
@@ -456,7 +457,12 @@ PHP_FUNCTION(stream_copy_to_stream)
RETURN_FALSE;
}
- RETURN_LONG(php_stream_copy_to_stream(src, dest, maxlen));
+ ret = php_stream_copy_to_stream_ex(src, dest, maxlen);
+
+ if (ret == PHP_STREAM_FAILURE) {
+ RETURN_FALSE;
+ }
+ RETURN_LONG(ret);
}
/* }}} */