summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorUwe Schindler <thetaphi@php.net>2009-11-12 17:13:05 (GMT)
committerUwe Schindler <thetaphi@php.net>2009-11-12 17:13:05 (GMT)
commitd80507b7d9ec6b1a247b2cd3685d6619730ae773 (patch)
tree0318fe3cb349a81c3736c73d981e2ae20dc5e3a8 /sapi
parent47189cac7bbdcd6588a13fbf66db22003404a8f9 (diff)
downloadphp-d80507b7d9ec6b1a247b2cd3685d6619730ae773.tar.gz
As I am working on it, further improvement for bug #50087
Diffstat (limited to 'sapi')
-rw-r--r--sapi/nsapi/nsapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c
index 99abd8e..4ab461c 100644
--- a/sapi/nsapi/nsapi.c
+++ b/sapi/nsapi/nsapi.c
@@ -726,8 +726,8 @@ static void sapi_nsapi_register_server_variables(zval *track_vars_array TSRMLS_D
/* DOCUMENT_ROOT */
if (value = request_translate_uri("/", rc->sn)) {
- value[strlen(value) - 1] = '\0';
- php_register_variable("DOCUMENT_ROOT", value, track_vars_array TSRMLS_CC);
+ pos = strlen(value);
+ php_register_variable_safe("DOCUMENT_ROOT", value, pos-1, track_vars_array TSRMLS_CC);
nsapi_free(value);
}