diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-06-24 18:08:16 -0700 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-06-24 18:08:16 -0700 |
commit | 0183a9af5ac6e186d554634b854a3a86d5830d6d (patch) | |
tree | b04f9d47a082711da7d5d900e24428294cbe6ed1 /sapi/cli | |
parent | 53de1c283053d91cb4add279cad507d000d77a51 (diff) | |
download | php-git-0183a9af5ac6e186d554634b854a3a86d5830d6d.tar.gz |
Fixed bug #72484 (SCRIPT_FILENAME shows wrong path if the user specify router.php)
Diffstat (limited to 'sapi/cli')
-rw-r--r-- | sapi/cli/php_cli_server.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index f94ac74741..b9c1f342ca 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -660,10 +660,7 @@ static void sapi_cli_server_register_variables(zval *track_vars_array) /* {{{ */ if (SG(request_info).path_translated) { sapi_cli_server_register_variable(track_vars_array, "SCRIPT_FILENAME", SG(request_info).path_translated); } else if (client->server->router) { - char *temp; - spprintf(&temp, 0, "%s/%s", client->server->document_root, client->server->router); - sapi_cli_server_register_variable(track_vars_array, "SCRIPT_FILENAME", temp); - efree(temp); + sapi_cli_server_register_variable(track_vars_array, "SCRIPT_FILENAME", client->server->router); } if (client->request.path_info) { sapi_cli_server_register_variable(track_vars_array, "PATH_INFO", client->request.path_info); |