@@ -95,11 +95,11 @@ |
||
| 95 | 95 | |
| 96 | 96 | // try to access subtree |
| 97 | 97 | try { |
| 98 | - // create new subtree if requested subtree already has a value |
|
| 99 | - if (!is_a($tree->$key, '\Micro\Config')) { |
|
| 100 | - $tree[$key] = new Config([$tree->$key]); |
|
| 101 | - } |
|
| 102 | - $tree = $tree->$key; |
|
| 98 | + // create new subtree if requested subtree already has a value |
|
| 99 | + if (!is_a($tree->$key, '\Micro\Config')) { |
|
| 100 | + $tree[$key] = new Config([$tree->$key]); |
|
| 101 | + } |
|
| 102 | + $tree = $tree->$key; |
|
| 103 | 103 | } catch (Exception $e) { |
| 104 | 104 | // set value if last keypart or create subtree |
| 105 | 105 | if($i == (count($name) - 1)) { |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | $tree = $tree->$key; |
| 103 | 103 | } catch (Exception $e) { |
| 104 | 104 | // set value if last keypart or create subtree |
| 105 | - if($i == (count($name) - 1)) { |
|
| 105 | + if ($i == (count($name) - 1)) { |
|
| 106 | 106 | $tree[$key] = $value; |
| 107 | 107 | } else { |
| 108 | 108 | $tree[$key] = new Config(); |