summaryrefslogtreecommitdiff
path: root/sapi/cgi
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/cgi')
-rw-r--r--sapi/cgi/cgi_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c
index 87be584b6c..459b5cbf66 100644
--- a/sapi/cgi/cgi_main.c
+++ b/sapi/cgi/cgi_main.c
@@ -129,7 +129,7 @@ static void sapi_cgi_register_variables(zval *track_vars_array ELS_DC SLS_DC PLS
/* Build the special-case PHP_SELF variable for the CGI version */
#if FORCE_CGI_REDIRECT
- php_register_variable("PHP_SELF", (SG(request_info).request_uri ? SG(request_info).request_uri, track_vars_array ELS_CC PLS_CC);
+ php_register_variable("PHP_SELF", (SG(request_info).request_uri ? SG(request_info).request_uri:""), track_vars_array ELS_CC PLS_CC);
#else
{
char *sn;