summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/php_cli_server.c5
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);