diff --git a/NEWS b/NEWS index aaf503112bc..4cf958344b8 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.3.14 +- Cli: + . Fixed bug GH-16373 (Shebang is not skipped for router script in cli-server + started through shebang). (ilutov) + - COM: . Fixed out of bound writes to SafeArray data. (cmb) diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index aa54cf9c7b0..585ac8ab9d8 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -2280,6 +2280,7 @@ static bool php_cli_server_dispatch_router(php_cli_server *server, php_cli_serve } ZVAL_UNDEF(&retval); + CG(skip_shebang) = true; if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE, &retval, 1, &zfd)) { if (Z_TYPE(retval) != IS_UNDEF) { decline = Z_TYPE(retval) == IS_FALSE;