mirror of
https://git.tt-rss.org/fox/tt-rss.git
synced 2025-12-07 14:00:59 +01:00
allow blank override values
This commit is contained in:
parent
77b5201b7d
commit
5bb8714839
@ -139,7 +139,7 @@ class Config {
|
|||||||
|
|
||||||
list ($defval, $deftype) = $this::_DEFAULTS[$const];
|
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) {
|
private function _add(string $param, string $default, int $type_hint) {
|
||||||
$override = getenv($this::_ENVVAR_PREFIX . $param);
|
$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) {
|
static function add(string $param, string $default, int $type_hint = Config::T_STRING) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user