diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/streams/streams.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 1f6fc89a79..495feab100 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -152,10 +152,16 @@ static zend_llist *php_get_wrapper_errors_list(php_stream_wrapper *wrapper) /* {{{ wrapper error reporting */ void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char *path, const char *caption) { - char *tmp = estrdup(path); + char *tmp; char *msg; int free_msg = 0; + if (EG(exception)) { + /* Don't emit additional warnings if an exception has already been thrown. */ + return; + } + + tmp = estrdup(path); if (wrapper) { zend_llist *err_list = php_get_wrapper_errors_list(wrapper); if (err_list) { |