@@ -2040,6 +2040,12 @@ int main(int argc, char **argv) /* {{{ */
2040
2040
zend_objects_store_mark_destructed (& EG (objects_store ));
2041
2041
}
2042
2042
2043
+ if (PHPDBG_G (exec ) && !memcmp ("-" , PHPDBG_G (exec ), 2 )) { /* i.e. execution context has been read from stdin - back it up */
2044
+ phpdbg_file_source * data = zend_hash_str_find_ptr (& PHPDBG_G (file_sources ), PHPDBG_G (exec ), PHPDBG_G (exec_len ));
2045
+ backup_phpdbg_compile = zend_string_alloc (data -> len + 2 , 1 );
2046
+ sprintf (ZSTR_VAL (backup_phpdbg_compile ), "?>%.*s" , (int ) data -> len , data -> buf );
2047
+ }
2048
+
2043
2049
/* backup globals when cleaning */
2044
2050
if ((cleaning > 0 || remote ) && !quit_immediately ) {
2045
2051
settings = calloc (1 , sizeof (zend_phpdbg_globals ));
@@ -2099,12 +2105,6 @@ int main(int argc, char **argv) /* {{{ */
2099
2105
wrapper -> wops -> stream_opener = PHPDBG_G (orig_url_wrap_php );
2100
2106
}
2101
2107
2102
- if (PHPDBG_G (exec ) && !memcmp ("-" , PHPDBG_G (exec ), 2 )) { /* i.e. execution context has been read from stdin - back it up */
2103
- phpdbg_file_source * data = zend_hash_str_find_ptr (& PHPDBG_G (file_sources ), PHPDBG_G (exec ), PHPDBG_G (exec_len ));
2104
- backup_phpdbg_compile = zend_string_alloc (data -> len + 2 , 1 );
2105
- sprintf (ZSTR_VAL (backup_phpdbg_compile ), "?>%.*s" , (int ) data -> len , data -> buf );
2106
- }
2107
-
2108
2108
zend_try {
2109
2109
php_module_shutdown ();
2110
2110
} zend_end_try ();
0 commit comments