com php-src: Merge remote-tracking branch 'origin/PHP-7.0' into PHP-7.1: sapi/phpdbg/phpdbg.c sapi/phpdbg/tests/include.inc
| From: | Anatol Belski | Date: | Thu, 13 Oct 2016 23:54:18 +0000 |
| Subject: | com php-src: Merge remote-tracking branch 'origin/PHP-7.0' into PHP-7.1: sapi/phpdbg/phpdbg.c sapi/phpdbg/tests/include.inc | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95055@lists.php.net to get a copy of this message | ||
Commit: f40c03168ef1ac9517560947ea63d9d54c3dc82c
Author: Bob Weinand <bobwei9@hotmail.com> Wed, 12 Oct 2016 22:57:41 +0200
Committer: Anatol Belski <ab@php.net> Fri, 14 Oct 2016 01:54:18 +0200
Parents: 6baaccc9b630daf4a8afd618b725cfa9450dda45
Branches: PHP-7.1
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f40c03168ef1ac9517560947ea63d9d54c3dc82c
Log:
Merge remote-tracking branch 'origin/PHP-7.0' into PHP-7.1
(cherry picked from commit 457e68626257e8b5c891f2edf20d31907080063a)
Changed paths:
M sapi/phpdbg/phpdbg.c
A sapi/phpdbg/tests/include.inc
Diff:
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index f4b4273..361b2c5 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();
diff --git a/sapi/phpdbg/tests/include.inc b/sapi/phpdbg/tests/include.inc
new file mode 100644
index 0000000..fb1b7ca
--- /dev/null
+++ b/sapi/phpdbg/tests/include.inc
@@ -0,0 +1,3 @@
+<?php
+
+echo 1;