]> granicus.if.org Git - php/commitdiff
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini variables)
authorJani Taskinen <jani@php.net>
Wed, 25 Nov 2009 12:35:42 +0000 (12:35 +0000)
committerJani Taskinen <jani@php.net>
Wed, 25 Nov 2009 12:35:42 +0000 (12:35 +0000)
NEWS
sapi/apache2handler/sapi_apache2.c

diff --git a/NEWS b/NEWS
index 0f459b18f11711ae887517423d97c8a081c12913..653f37eee2a3a0135504994f7b8be09598f27721 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,8 @@ PHP                                                                        NEWS
 - Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
 - Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
   containing = or ?). (Pierrick)
+- Fixed bug #49677 (ini parser crashes with apache2 and using ${something}
+  ini variables). (Jani)
 - Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
   (Pierrick)
 
index afd503258687344a06caf59dacd33f4e625ebd76..2d224ee26159fb15d3d2c774a487e622f211c23c 100644 (file)
@@ -224,6 +224,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;