Skip to content

Commit 3074cbf

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Skip shebang in cli-server router script
2 parents 3546733 + 77f7708 commit 3074cbf

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.4.0RC3
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
@@ -2266,6 +2266,7 @@ static bool php_cli_server_dispatch_router(php_cli_server *server, php_cli_serve
22662266
int sg_options_back = SG(options);
22672267
/* Don't chdir to the router script because the file path may be relative. */
22682268
SG(options) |= SAPI_OPTION_NO_CHDIR;
2269+
CG(skip_shebang) = true;
22692270
bool result = php_execute_script_ex(&zfd, &retval);
22702271
SG(options) = sg_options_back;
22712272
if (result) {

0 commit comments

Comments
 (0)