Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix max_execution_time with cli-server router script
This commit is contained in:
Ilija Tovilo 2023-12-07 16:13:21 +01:00
commit a559a5e530
No known key found for this signature in database
GPG Key ID: A4F5D403F118200A
2 changed files with 15 additions and 0 deletions

4
NEWS
View File

@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.3.2
- Cli:
. Fix incorrect timeout in built-in web server when using router script and
max_input_time. (ilutov)
- Core:
. Fixed bug GH-12854 (8.3 - as final trait-used method does not correctly
report visibility in Reflection). (nielsdos)

View File

@ -2249,6 +2249,17 @@ static bool php_cli_server_dispatch_router(php_cli_server *server, php_cli_serve
zend_try {
zval retval;
/* Normally php_execute_script restarts the timer with max_execution_time if it has
* previously been initialized with max_input_time. We're not using php_execute_script here
* because it does not provide a way to get the return value of the main script, so we need
* to restart the timer manually. */
if (PG(max_input_time) != -1) {
#ifdef PHP_WIN32
zend_unset_timeout();
#endif
zend_set_timeout(INI_INT("max_execution_time"), 0);
}
ZVAL_UNDEF(&retval);
if (SUCCESS == zend_execute_scripts(ZEND_REQUIRE, &retval, 1, &zfd)) {
if (Z_TYPE(retval) != IS_UNDEF) {