diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2016-10-12 22:57:41 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2016-10-12 22:57:41 +0200 |
commit | 457e68626257e8b5c891f2edf20d31907080063a (patch) | |
tree | 9e1272a9aaab54556f08787d3de5fc8850151af1 /sapi/phpdbg/phpdbg.c | |
parent | 9669ec707ab99d33404d3132792a24ebd1130fcf (diff) | |
parent | fe49fd7daddd740d84601504fe55dbc33c858d4c (diff) | |
download | php-git-457e68626257e8b5c891f2edf20d31907080063a.tar.gz |
Merge remote-tracking branch 'origin/PHP-7.0' into PHP-7.1
Diffstat (limited to 'sapi/phpdbg/phpdbg.c')
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index be50de8070..301e55cd4e 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -2062,6 +2062,12 @@ phpdbg_out: php_request_shutdown(NULL); } zend_end_try(); + if (PHPDBG_G(exec) && !memcmp("-", PHPDBG_G(exec), 2)) { /* i.e. execution context has been read from stdin - back it up */ + phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_G(exec_len)); + backup_phpdbg_compile = zend_string_alloc(data->len + 2, 1); + sprintf(ZSTR_VAL(backup_phpdbg_compile), "?>%.*s", (int) data->len, data->buf); + } + /* backup globals when cleaning */ if ((cleaning > 0 || remote) && !quit_immediately) { settings = calloc(1, sizeof(zend_phpdbg_globals)); @@ -2114,12 +2120,6 @@ phpdbg_out: wrapper->wops->stream_opener = PHPDBG_G(orig_url_wrap_php); } - if (PHPDBG_G(exec) && !memcmp("-", PHPDBG_G(exec), 2)) { /* i.e. execution context has been read from stdin - back it up */ - phpdbg_file_source *data = zend_hash_str_find_ptr(&PHPDBG_G(file_sources), PHPDBG_G(exec), PHPDBG_G(exec_len)); - backup_phpdbg_compile = zend_string_alloc(data->len + 2, 1); - sprintf(ZSTR_VAL(backup_phpdbg_compile), "?>%.*s", (int) data->len, data->buf); - } - zend_try { php_module_shutdown(); } zend_end_try(); |