1
0
Fork 0

Bugfixings in Config

- replaced usage of "!<unset>!" with null-returns
- fixed bool settings (0/1)
- fixed overriding config-values
- fixed basepath problems
This commit is contained in:
Philipp Holzer 2019-02-22 23:51:13 +01:00
commit 8c3aebc376
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
24 changed files with 175 additions and 157 deletions

View file

@ -83,20 +83,19 @@ class Configuration
if ($this->configAdapter->isConnected() &&
(!$this->configAdapter->isLoaded($cat, $key) ||
$refresh)) {
$dbvalue = $this->configAdapter->get($cat, $key);
if ($dbvalue !== '!<unset>!') {
if (isset($dbvalue)) {
$this->configCache->set($cat, $key, $dbvalue);
return $dbvalue;
}
}
// use the config cache for return
if ($this->configCache->has($cat, $key)) {
return $this->configCache->get($cat, $key);
} else {
return $default_value;
}
$result = $this->configCache->get($cat, $key);
return (isset($result)) ? $result : $default_value;
}
/**