fixing tests and preload config

This commit is contained in:
Philipp Holzer 2019-02-23 00:09:57 +01:00
parent 8d56fb8fbe
commit 1dee89f215
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
6 changed files with 12 additions and 60 deletions

View file

@ -33,7 +33,7 @@ class PreloadConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAd
$configs = DBA::select('config', ['cat', 'v', 'k']);
while ($config = DBA::fetch($configs)) {
$value = $config['v'];
if (isset($value) && $value !== '') {
if (isset($value)) {
$return[$config['cat']][$config['k']] = $value;
}
}
@ -58,7 +58,7 @@ class PreloadConfigAdapter extends AbstractDbaConfigAdapter implements IConfigAd
// manage array value
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
if (isset($value) && $value !== '') {
if (isset($value)) {
return $value;
}
}

View file

@ -50,7 +50,7 @@ class PreloadPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfig
$pconfigs = DBA::select('pconfig', ['cat', 'v', 'k'], ['uid' => $uid]);
while ($pconfig = DBA::fetch($pconfigs)) {
$value = $pconfig['v'];
if (isset($value) && $value !== '') {
if (isset($value)) {
$return[$pconfig['cat']][$pconfig['k']] = $value;
}
}
@ -79,7 +79,7 @@ class PreloadPConfigAdapter extends AbstractDbaConfigAdapter implements IPConfig
// manage array value
$value = (preg_match("|^a:[0-9]+:{.*}$|s", $config['v']) ? unserialize($config['v']) : $config['v']);
if (isset($value) && $value !== '') {
if (isset($value)) {
return $value;
}
}