]> 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 0c2279d5eb330c290665a42ec7cd40feb42e17bd..e20f00f4904205ae676ee3077d7b8acf792b70df 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -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)
index c77e5647e17ffa9673772723e913d9707ec179d7..ecf1802c0adbe563e691380f49137917e48826e6 100644 (file)
@@ -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;