From: Xinchen Hui Date: Mon, 21 Sep 2015 02:55:38 +0000 (+0800) Subject: Fixed bug #70538 ("php-fpm -i" crashes) X-Git-Tag: php-7.0.0RC4~4^2~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a247c3a27df89a9839c8d87d66173f4f59873d3a;p=php Fixed bug #70538 ("php-fpm -i" crashes) --- 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;