com php-src: Fixed bug #70538 ("php-fpm -i" crashes): sapi/fpm/fpm/fpm_main.c
| From: | Xinchen Hui | Date: | Mon, 21 Sep 2015 02:55:38 +0000 |
| Subject: | com php-src: Fixed bug #70538 ("php-fpm -i" crashes): sapi/fpm/fpm/fpm_main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89094@lists.php.net to get a copy of this message | ||
Commit: a247c3a27df89a9839c8d87d66173f4f59873d3a
Author: Xinchen Hui <laruence@gmail.com> Mon, 21 Sep 2015 10:55:38 +0800
Parents: 4febfc25a6ee4bc46ce09e991be0359d81809bde
Branches: PHP-7.0
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a247c3a27df89a9839c8d87d66173f4f59873d3a
Log:
Fixed bug #70538 ("php-fpm -i" crashes)
Bugs:
https://bugs.php.net/70538
Changed paths:
M sapi/fpm/fpm/fpm_main.c
Diff:
diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c
index 7b02d33..18f8a90 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;