Skip to content

Commit

Permalink
Merge pull request #199 from novashdima/master
Browse files Browse the repository at this point in the history
Fix var data types
  • Loading branch information
misterunknown authored Jul 10, 2024
2 parents 05d40dd + 0fcd3b5 commit 06ac9b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ public function __construct($config=[]) {
// 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
}
}
}

Expand Down

0 comments on commit 06ac9b5

Please sign in to comment.