summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2015-03-08 22:45:47 -0700
committerStanislav Malyshev <stas@php.net>2015-03-08 22:52:21 -0700
commit43b426fbc4ff6f6274ae579bead669767fe08376 (patch)
tree5c8d0cba6c70e074cffd449f82665540691c11a5 /main
parenta2a20d29a85c311ba1ecf44aaa2468ca477b3b48 (diff)
parentc4c3dca302df627c492e6ce885b777f21dce9f78 (diff)
downloadphp-git-43b426fbc4ff6f6274ae579bead669767fe08376.tar.gz
Merge branch 'pull-request/1106' into PHP-5.5
* pull-request/1106: 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..1732a99e12 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 0;
+ }
+
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);