diff options
author | Gustavo André dos Santos Lopes <cataphract@php.net> | 2011-07-05 16:09:06 +0000 |
---|---|---|
committer | Gustavo André dos Santos Lopes <cataphract@php.net> | 2011-07-05 16:09:06 +0000 |
commit | afe4570cda15b5faa440376433a4dd93077679d1 (patch) | |
tree | d30d3c7cd1a6027f13922f35d22fd323875ddb2c /main/streams/streams.c | |
parent | 0494615b3c8be61393c4a0094a07bc4fc0d29f90 (diff) | |
download | php-git-afe4570cda15b5faa440376433a4dd93077679d1.tar.gz |
- Fixed bug #52935 (call exit in user_error_handler cause stream relate core).
Diffstat (limited to 'main/streams/streams.c')
-rwxr-xr-x | main/streams/streams.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 673795971a..15c1454547 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -163,6 +163,7 @@ void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char * char *tmp = estrdup(path); char *msg; int free_msg = 0; + php_stream_wrapper orig_wrapper; if (wrapper) { if (wrapper->err_count > 0) { @@ -207,7 +208,16 @@ void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char * } php_strip_url_passwd(tmp); + if (wrapper) { + /* see bug #52935 */ + orig_wrapper = *wrapper; + wrapper->err_stack = NULL; + wrapper->err_count = 0; + } php_error_docref1(NULL TSRMLS_CC, tmp, E_WARNING, "%s: %s", caption, msg); + if (wrapper) { + *wrapper = orig_wrapper; + } efree(tmp); if (free_msg) { efree(msg); |