Skip to content

Commit 06efe44

Browse files
committed
Skip shebang in cli-server router script
Fixes GH-16373 Closes GH-16403
1 parent 3843f0e commit 06efe44

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.2.26
44

5+
- Cli:
6+
. Fixed bug GH-16373 (Shebang is not skipped for router script in cli-server
7+
started through shebang). (ilutov)
8+
59
- COM:
610
. Fixed out of bound writes to SafeArray data. (cmb)
711

sapi/cli/php_cli_server.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,7 @@ static int php_cli_server_dispatch_router(php_cli_server *server, php_cli_server
22712271
}
22722272

22732273
ZVAL_UNDEF(&retval);
2274+
CG(skip_shebang) = true;
22742275
if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE, &retval, 1, &zfd)) {
22752276
if (Z_TYPE(retval) != IS_UNDEF) {
22762277
decline = Z_TYPE(retval) == IS_FALSE;

0 commit comments

Comments
 (0)