]> granicus.if.org Git - php/commitdiff
Update NEWS
authorBob Weinand <bobwei9@hotmail.com>
Wed, 12 Oct 2016 20:54:32 +0000 (22:54 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Wed, 12 Oct 2016 20:54:32 +0000 (22:54 +0200)
Also add missing include.inc test file

NEWS
sapi/phpdbg/phpdbg.c
sapi/phpdbg/tests/include.inc [new file with mode: 0644]

diff --git a/NEWS b/NEWS
index 9fa25016de1932b86720dd2a27989e9c71341cb1..2b03b3131c2db20128ea01b1fae14df59b9db227 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,8 @@ PHP                                                                        NEWS
 
 - phpdbg:
   . Properly allow for stdin input from a file. (Bob)
+  . Add -s command line option / stdin command for reading script from stdin.
+    (Bob)
 
 - Session:
   . Fixed bug #73273 (session_unset() empties values from all variables in which
index 308aab643131ed975a4a15c12cce1164849ec0fa..fda8962568bdfb77d9aa0a95cc618ed24a7ff875 100644 (file)
@@ -2040,6 +2040,12 @@ phpdbg_out:
                        zend_objects_store_mark_destructed(&EG(objects_store));
                }
 
+               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));
@@ -2099,12 +2105,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 (file)
index 0000000..fb1b7ca
--- /dev/null
@@ -0,0 +1,3 @@
+<?php
+
+echo 1;