aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Config.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Config.php b/lib/private/Config.php
index fe97bd01217..aa20f627edc 100644
--- a/lib/private/Config.php
+++ b/lib/private/Config.php
@@ -228,9 +228,10 @@ class Config {
// grab any "NC_" environment variables
$envRaw = getenv();
// only save environment variables prefixed with "NC_" in the cache
+ $envPrefixLen = strlen(self::ENV_PREFIX);
foreach ($envRaw as $rawEnvKey => $rawEnvValue) {
if (str_starts_with($rawEnvKey, self::ENV_PREFIX)) {
- $realKey = explode(self::ENV_PREFIX, $rawEnvKey)[1];
+ $realKey = substr($rawEnvKey, $envPrefixLen);
$this->envCache[$realKey] = $rawEnvValue;
}
}