1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 01:26:32 +02:00
This commit is contained in:
Dmytro Novash
2024-07-10 15:05:44 +03:00
parent 71d6a1b51f
commit 0fcd3b5ed8

View File

@@ -87,11 +87,11 @@ class IFM {
// load config from environment variables // load config from environment variables
foreach (array_keys($this->config) as $key) { foreach (array_keys($this->config) as $key) {
if (($value = getenv('IFM_' . strtoupper($key))) !== false) { if (($value = getenv('IFM_' . strtoupper($key))) !== false) {
if (is_numeric($value)) { if (is_numeric($value)) {
$this->config[$key] = intval($value); $this->config[$key] = intval($value);
} else { } else {
$this->config[$key] = trim($value, implode(['"', "'"])); // remove quotes from env vars $this->config[$key] = trim($value, implode(['"', "'"])); // remove quotes from env vars
} }
} }
} }