diff --git a/classes/config.php b/classes/config.php index cd10c0158..3e643b2d0 100644 --- a/classes/config.php +++ b/classes/config.php @@ -139,7 +139,7 @@ class Config { list ($defval, $deftype) = $this::_DEFAULTS[$const]; - $this->params[$cvalue] = [ self::cast_to(!empty($override) ? $override : $defval, $deftype), $deftype ]; + $this->params[$cvalue] = [ self::cast_to($override !== false ? $override : $defval, $deftype), $deftype ]; } } } @@ -264,7 +264,7 @@ class Config { private function _add(string $param, string $default, int $type_hint) { $override = getenv($this::_ENVVAR_PREFIX . $param); - $this->params[$param] = [ self::cast_to(!empty($override) ? $override : $default, $type_hint), $type_hint ]; + $this->params[$param] = [ self::cast_to($override !== false ? $override : $default, $type_hint), $type_hint ]; } static function add(string $param, string $default, int $type_hint = Config::T_STRING) {