1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-12 02:53:58 +02:00

fix var types

This commit is contained in:
Dmytro Novash
2024-07-10 14:58:58 +03:00
parent 05d40dd4cb
commit 71d6a1b51f

View File

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