parent
c41079192f
commit
7bd0c5abdd
|
@ -238,17 +238,19 @@ EOT
|
||||||
} elseif (strpos($settingKey, '.')) {
|
} elseif (strpos($settingKey, '.')) {
|
||||||
$bits = explode('.', $settingKey);
|
$bits = explode('.', $settingKey);
|
||||||
$data = $data['config'];
|
$data = $data['config'];
|
||||||
|
$match = false;
|
||||||
foreach ($bits as $bit) {
|
foreach ($bits as $bit) {
|
||||||
if (isset($data[$bit])) {
|
$key = isset($key) ? $key.'.'.$bit : $bit;
|
||||||
$data = $data[$bit];
|
$match = false;
|
||||||
} elseif (isset($data[implode('.', $bits)])) {
|
if (isset($data[$key])) {
|
||||||
// last bit can contain domain names and such so try to join whatever is left if it exists
|
$match = true;
|
||||||
$data = $data[implode('.', $bits)];
|
$data = $data[$key];
|
||||||
break;
|
unset($key);
|
||||||
} else {
|
|
||||||
throw new \RuntimeException($settingKey.' is not defined');
|
|
||||||
}
|
}
|
||||||
array_shift($bits);
|
}
|
||||||
|
|
||||||
|
if (!$match) {
|
||||||
|
throw new \RuntimeException($settingKey.' is not defined.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$value = $data;
|
$value = $data;
|
||||||
|
|
Loading…
Reference in New Issue