summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sapi/fpm/fpm/fpm_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 7b02d33dff..18f8a908db 100644
--- a/sapi/fpm/fpm/fpm_main.c
+++ b/sapi/fpm/fpm/fpm_main.c
@@ -601,7 +601,7 @@ static void sapi_cgi_register_variables(zval *track_vars_array) /* {{{ */
if (CGIG(fix_pathinfo)) {
char *script_name = SG(request_info).request_uri;
unsigned int script_name_len = script_name ? strlen(script_name) : 0;
- char *path_info = FCGI_GETENV(request, "PATH_INFO");
+ char *path_info = request? FCGI_GETENV(request, "PATH_INFO") : NULL;
unsigned int path_info_len = path_info ? strlen(path_info) : 0;
php_self_len = script_name_len + path_info_len;