diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2025-04-08 18:38:10 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2025-04-08 18:38:10 +0300 |
| commit | f9e8911727064dd49119bd09b36e41fc1230b09c (patch) | |
| tree | 8f3d8afbbf73ae7d59791a3347a557c194f691d0 | |
| parent | 44e23469a0379a63eaa2701a6fb981008dc97875 (diff) | |
Revert "cleanup environment variables related to global configuration after instantiating config object"
This reverts commit e4f1480453a86401f93ed97878c270628fe4d2b7.
| -rw-r--r-- | .docker/app/startup.sh | 2 | ||||
| -rw-r--r-- | classes/Config.php | 10 |
2 files changed, 0 insertions, 12 deletions
diff --git a/.docker/app/startup.sh b/.docker/app/startup.sh index 6113cf424..cf93b7413 100644 --- a/.docker/app/startup.sh +++ b/.docker/app/startup.sh @@ -156,8 +156,6 @@ find ${SCRIPT_ROOT}/sql/post-init.d/ -type f -name '*.sql' | while read F; do $PSQL -f $F done -unset PGPASSWORD - touch $DST_DIR/.app_is_ready exec /usr/sbin/php-fpm${PHP_SUFFIX} --nodaemonize --force-stderr diff --git a/classes/Config.php b/classes/Config.php index 0774bd76a..5098bfe68 100644 --- a/classes/Config.php +++ b/classes/Config.php @@ -285,11 +285,6 @@ class Config { if (isset(self::_DEFAULTS[$const])) { $override = getenv(self::_ENVVAR_PREFIX . $const); - // cleanup original env var after importing - putenv(self::_ENVVAR_PREFIX . $const . '='); - unset($_ENV[self::_ENVVAR_PREFIX . $const]); - unset($_SERVER[self::_ENVVAR_PREFIX . $const]); - list ($defval, $deftype) = self::_DEFAULTS[$const]; $this->params[$cvalue] = [ self::cast_to($override !== false ? $override : $defval, $deftype), $deftype ]; @@ -448,11 +443,6 @@ class Config { private function _add(string $param, string $default, int $type_hint): void { $override = getenv(self::_ENVVAR_PREFIX . $param); - // cleanup original env var after importing - putenv(self::_ENVVAR_PREFIX . $param . '='); - unset($_ENV[self::_ENVVAR_PREFIX . $param]); - unset($_SERVER[self::_ENVVAR_PREFIX . $param]); - $this->params[$param] = [ self::cast_to($override !== false ? $override : $default, $type_hint), $type_hint ]; } |