summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2015-09-21 10:55:38 +0800
committerXinchen Hui <laruence@gmail.com>2015-09-21 10:55:38 +0800
commita247c3a27df89a9839c8d87d66173f4f59873d3a (patch)
tree2f67b26fd00f9421e2284d1cd2ebd1b88893a03a
parent4febfc25a6ee4bc46ce09e991be0359d81809bde (diff)
downloadphp-git-a247c3a27df89a9839c8d87d66173f4f59873d3a.tar.gz
Fixed bug #70538 ("php-fpm -i" crashes)
-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;