From 9bf8cd4b3437f6335e20843c9e3668b44761feba Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 6 Apr 2012 21:42:40 +0800 Subject: [PATCH] Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables (without apache2)) --- NEWS | 4 +++- main/SAPI.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 6eff5c30e7a..a660a9108c6 100644 --- a/NEWS +++ b/NEWS @@ -18,7 +18,9 @@ PHP NEWS (merge after 5.3.11 release) - Core: - - Fixed bug #61605 (header_remove() does not remove all headers). + . Fixed bug #61650 (ini parser crashes when using ${xxxx} ini variables + (without apache2)). (Laruence) + . Fixed bug #61605 (header_remove() does not remove all headers). (Laruence) . Fixed bug #61541 (Segfault when using ob_* in output_callback). (reeze.xia@gmail.com) diff --git a/main/SAPI.c b/main/SAPI.c index df550e02499..05644df11d5 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -980,7 +980,9 @@ SAPI_API char *sapi_getenv(char *name, size_t name_len TSRMLS_DC) } else { return NULL; } - sapi_module.input_filter(PARSE_ENV, name, &value, strlen(value), NULL TSRMLS_CC); + if (sapi_module.input_filter) { + sapi_module.input_filter(PARSE_ENV, name, &value, strlen(value), NULL TSRMLS_CC); + } return value; } return NULL;