This can get called when "<key> = ${<key>}:/foo" is used in a .ini file, but <key> has not be set yet.
You will end up with a value of ":/foo", but at least it will not crash now.
?? ??? 2005, PHP 5.1 Beta 3
- Added PDO_MYSQL_ATTR_USE_BUFFERED_QUERY parameter for pdo_mysql, to toggle
usage of buffered queries.
+- Added a SG(server_context) NULL check to php_apache_getenv. (Brian)
- Fixed bug #33491 (crash after extending MySQLi internal class). (Tony)
- Fixed bug #33475 (cURL handle is not closed on curl_close(). (Ilia)
- Fixed bug #33469 (Compile error undefined reference to ifx_checkAPI). (Jani)
*/
static char *php_apache_getenv(char *name, size_t name_len TSRMLS_DC)
{
+ if (SG(server_context) == NULL) {
+ return NULL;
+ }
+
return (char *) table_get(((request_rec *) SG(server_context))->subprocess_env, name);
}
/* }}} */