diff options
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 4 |
2 files changed, 6 insertions, 0 deletions
@@ -77,6 +77,8 @@ PHP NEWS (Ilia, wmeler at wp-sa dot pl) - Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private property in base class). (Felipe) +- Fixed bug #49677 (ini parser crashes with apache2 and using ${something} + ini variables). (Jani) - Fixed bug #49647 (DOMUserData does not exist). (Rob) - Fixed bug #49521 (PDO fetchObject sets values before calling constructor). (Pierrick) diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index c77e5647e1..ecf1802c0a 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -239,6 +239,10 @@ php_apache_sapi_getenv(char *name, size_t name_len TSRMLS_DC) php_struct *ctx = SG(server_context); const char *env_var; + if (ctx == NULL) { + return NULL; + } + env_var = apr_table_get(ctx->r->subprocess_env, name); return (char *) env_var; |
