mirror of
https://github.com/friendica/friendica
synced 2025-04-26 12:30:11 +00:00
fixing tests and preload config
This commit is contained in:
parent
8d56fb8fbe
commit
1dee89f215
6 changed files with 12 additions and 60 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue