Skip to content

Commit bf7ed5e

Browse files
author
Jani Taskinen
committed
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini variables)
1 parent afc44b9 commit bf7ed5e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ PHP NEWS
7777
(Ilia, wmeler at wp-sa dot pl)
7878
- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
7979
property in base class). (Felipe)
80+
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something}
81+
ini variables). (Jani)
8082
- Fixed bug #49647 (DOMUserData does not exist). (Rob)
8183
- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
8284
(Pierrick)

sapi/apache2handler/sapi_apache2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@ php_apache_sapi_getenv(char *name, size_t name_len TSRMLS_DC)
239239
php_struct *ctx = SG(server_context);
240240
const char *env_var;
241241

242+
if (ctx == NULL) {
243+
return NULL;
244+
}
245+
242246
env_var = apr_table_get(ctx->r->subprocess_env, name);
243247

244248
return (char *) env_var;

0 commit comments

Comments
 (0)