mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-10 15:08:28 +03:00
Fix Config handling
This commit is contained in:
parent
efbc7563ac
commit
d76ba3abc9
2 changed files with 16 additions and 10 deletions
|
|
@ -58,16 +58,7 @@ abstract class AbstractConfig implements \JsonSerializable
|
|||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
$aData = [];
|
||||
foreach ($this->aData as $sSectionKey => $aSectionValue) {
|
||||
if (\is_array($aSectionValue)) {
|
||||
$aData[$sSectionKey] = [];
|
||||
foreach ($aSectionValue as $sParamKey => $mParamValue) {
|
||||
$aData[$sSectionKey][$sParamKey] = $mParamValue[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $aData;
|
||||
return $this->aData;;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -37,4 +37,19 @@ class Plugin extends \RainLoop\Config\AbstractConfig
|
|||
{
|
||||
return $this->aMap;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
$aData = [];
|
||||
foreach ($this->aData as $sSectionKey => $aSectionValue) {
|
||||
if (\is_array($aSectionValue)) {
|
||||
$aData[$sSectionKey] = [];
|
||||
foreach ($aSectionValue as $sParamKey => $mParamValue) {
|
||||
$aData[$sSectionKey][$sParamKey] = $mParamValue[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $aData;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue