[TASK] Site config utility: Return content of value if present

This commit is contained in:
Philipp Dieter 2021-07-27 09:50:15 +02:00
parent fb13b84e45
commit fe832637ed

View File

@ -45,6 +45,12 @@ class SiteConfigUtility
foreach ($pathParts as $key) { foreach ($pathParts as $key) {
$current = &$current[$key]; $current = &$current[$key];
} }
if (is_array($current)
&& array_key_exists('value', $current)
&& count($current) === 1
) {
$current = $current['value'];
}
return $current; return $current;
} }
} }