1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 17:46:31 +02:00

Merge pull request #199 from novashdima/master

Fix var data types
This commit is contained in:
Marco Dickert
2024-07-10 14:26:28 +02:00
committed by GitHub

View File

@@ -87,9 +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)) {
$value = intval($value); $this->config[$key] = intval($value);
$this->config[$key] = trim($value, implode(['"', "'"])); // remove quotes from env vars } else {
$this->config[$key] = trim($value, implode(['"', "'"])); // remove quotes from env vars
}
} }
} }