summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorJulien Pauli <jpauli@php.net>2014-07-15 17:18:56 +0200
committerJulien Pauli <jpauli@php.net>2015-02-20 16:07:40 +0100
commitc4c3dca302df627c492e6ce885b777f21dce9f78 (patch)
tree1c2603d2a08c9bb0719441cbb516456dde1215e5 /main
parent6393556a5d17a163dd8bbc85ea3a661b3112cfd6 (diff)
downloadphp-git-c4c3dca302df627c492e6ce885b777f21dce9f78.tar.gz
Fix #67626
Diffstat (limited to 'main')
-rw-r--r--main/streams/userspace.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/main/streams/userspace.c b/main/streams/userspace.c
index ec223534ff..573b46f5db 100644
--- a/main/streams/userspace.c
+++ b/main/streams/userspace.c
@@ -645,6 +645,11 @@ static size_t php_userstreamop_write(php_stream *stream, const char *buf, size_t
zval_ptr_dtor(&zbufptr);
didwrite = 0;
+
+ if (EG(exception)) {
+ return 0;
+ }
+
if (call_result == SUCCESS && retval != NULL) {
convert_to_long(retval);
didwrite = Z_LVAL_P(retval);
@@ -692,6 +697,12 @@ static size_t php_userstreamop_read(php_stream *stream, char *buf, size_t count
1, args,
0, NULL TSRMLS_CC);
+ zval_ptr_dtor(&zcount);
+
+ if (EG(exception)) {
+ return -1;
+ }
+
if (call_result == SUCCESS && retval != NULL) {
convert_to_string(retval);
didread = Z_STRLEN_P(retval);
@@ -706,7 +717,6 @@ static size_t php_userstreamop_read(php_stream *stream, char *buf, size_t count
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_READ " is not implemented!",
us->wrapper->classname);
}
- zval_ptr_dtor(&zcount);
if (retval) {
zval_ptr_dtor(&retval);