diff options
author | Jani Taskinen <jani@php.net> | 2009-11-25 12:35:42 +0000 |
---|---|---|
committer | Jani Taskinen <jani@php.net> | 2009-11-25 12:35:42 +0000 |
commit | bf7ed5eff5a39724b59beffaa3af2fc08117f490 (patch) | |
tree | ce771eefcdcd808eb60e71b86e11cbb509403ce1 /sapi/apache2handler | |
parent | afc44b981eed01c75ae36504bc15fdba171fd355 (diff) | |
download | php-git-bf7ed5eff5a39724b59beffaa3af2fc08117f490.tar.gz |
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini variables)
Diffstat (limited to 'sapi/apache2handler')
-rw-r--r-- | sapi/apache2handler/sapi_apache2.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |