Skip to content

Commit 15ae608

Browse files
committed
Drop special stream code handling, as this might been needed of the double free issue
1 parent 2732dac commit 15ae608

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

main/streams/streams.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <stddef.h>
3030
#include <fcntl.h>
3131
#include "php_streams_int.h"
32-
#include "Zend/zend_exceptions.h"
3332

3433
/* {{{ resource and registration code */
3534
/* 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 *
211210
msg = "no suitable wrapper could be found";
212211
}
213212

214-
/* To handle throw_on_error declare statement */
215-
zend_execute_data *ex = EG(current_execute_data);
216-
/* Find first non internal execute_data */
217-
while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
218-
ex = ex->prev_execute_data;
219-
}
220-
if ((ex->func->common.fn_flags & ZEND_ACC_THROW_WARNING) != 0) {
221-
zend_throw_exception_ex(zend_ce_exception, E_WARNING, "%s: %s", caption, msg);
222-
} else {
223-
php_strip_url_passwd(tmp);
224-
php_error_docref1(NULL, tmp, E_WARNING, "%s: %s", caption, msg);
225-
}
213+
php_strip_url_passwd(tmp);
214+
php_error_docref1(NULL, tmp, E_WARNING, "%s: %s", caption, msg);
226215
efree(tmp);
227216
if (free_msg) {
228217
efree(msg);

0 commit comments

Comments
 (0)