From 15ae60846721b0bf016afc67cc14eb26564521c5 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Fri, 31 Jul 2020 18:01:32 +0100 Subject: [PATCH] Drop special stream code handling, as this might been needed of the double free issue --- main/streams/streams.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/main/streams/streams.c b/main/streams/streams.c index ec71a3ed3ee9e..686427bc96643 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -29,7 +29,6 @@ #include #include #include "php_streams_int.h" -#include "Zend/zend_exceptions.h" /* {{{ resource and registration code */ /* Global wrapper hash, copied to FG(stream_wrappers) on registration of volatile wrapper */ @@ -211,18 +210,8 @@ void php_stream_display_wrapper_errors(php_stream_wrapper *wrapper, const char * msg = "no suitable wrapper could be found"; } - /* To handle throw_on_error declare statement */ - zend_execute_data *ex = EG(current_execute_data); - /* Find first non internal execute_data */ - while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) { - ex = ex->prev_execute_data; - } - if ((ex->func->common.fn_flags & ZEND_ACC_THROW_WARNING) != 0) { - zend_throw_exception_ex(zend_ce_exception, E_WARNING, "%s: %s", caption, msg); - } else { - php_strip_url_passwd(tmp); - php_error_docref1(NULL, tmp, E_WARNING, "%s: %s", caption, msg); - } + php_strip_url_passwd(tmp); + php_error_docref1(NULL, tmp, E_WARNING, "%s: %s", caption, msg); efree(tmp); if (free_msg) { efree(msg);