File tree Expand file tree Collapse file tree 2 files changed +33
-1
lines changed
Expand file tree Collapse file tree 2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -733,7 +733,7 @@ static void xdebug_execute_user_code_begin(zend_execute_data *execute_data)
733733 EX (opline ) = EX (func )-> op_array .opcodes ;
734734 }
735735
736- if (XG_BASE (in_execution ) && XDEBUG_VECTOR_COUNT (XG_BASE (stack )) == 0 ) {
736+ if (XG_BASE (in_execution ) && XDEBUG_VECTOR_COUNT (XG_BASE (stack )) == 0 && (( EG ( flags ) & EG_FLAGS_IN_SHUTDOWN ) == 0 ) ) {
737737 if (XDEBUG_MODE_IS (XDEBUG_MODE_STEP_DEBUG )) {
738738 xdebug_debugger_set_program_name (op_array -> filename );
739739 xdebug_debug_init_if_requested_at_startup ();
Original file line number Diff line number Diff line change 1+ --TEST--
2+ Test for bug #2322: Xdebug tries to open debugging connection in destructors during shutdown
3+ --SKIPIF--
4+ <?php
5+ require __DIR__ . '/../utils.inc ' ;
6+ check_reqs ('dbgp ' );
7+ ?>
8+ --INI--
9+ xdebug.mode=debug
10+ xdebug.start_with_request=yes
11+ xdebug.log=
12+ --FILE--
13+ <?php
14+ class Testing
15+ {
16+ function __destruct () {
17+ echo "Destruct \n" ;
18+ }
19+ }
20+
21+ $ t = array ();
22+ for ($ i =0 ; $ i <5 ; $ i ++) {
23+ $ t [] = new Testing ();
24+ }
25+ ?>
26+ --EXPECTF--
27+ Xdebug: [Step Debug] %sdebugging client%s
28+ Destruct
29+ Destruct
30+ Destruct
31+ Destruct
32+ Destruct
You can’t perform that action at this time.
0 commit comments