mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Fix missing syntax error message in cli-server router script
Fixes GH-13113 Closes GH-13275
This commit is contained in:
parent
18cdfd3f51
commit
c149b4f56f
7 changed files with 97 additions and 43 deletions
|
@ -2241,20 +2241,13 @@ 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)) {
|
||||
int sg_options_back = SG(options);
|
||||
/* Don't chdir to the router script because the file path may be relative. */
|
||||
SG(options) |= SAPI_OPTION_NO_CHDIR;
|
||||
bool result = php_execute_script_ex(&zfd, &retval);
|
||||
SG(options) = sg_options_back;
|
||||
if (result) {
|
||||
if (Z_TYPE(retval) != IS_UNDEF) {
|
||||
decline = Z_TYPE(retval) == IS_FALSE;
|
||||
zval_ptr_dtor(&retval);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue