Skip to content

Commit b583427

Browse files
helmis123wouterj
authored andcommitted
Update definition.rst
1 parent c0dddd6 commit b583427

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

components/config/definition.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,8 @@ character (``.``)::
820820

821821
$node = $treeBuilder->buildTree();
822822
$children = $node->getChildren();
823-
$path = $children['driver']->getPath();
823+
$childChildren = $children['connection']->getChildren();
824+
$path = $childChildren['driver']->getPath();
824825
// $path = 'database.connection.driver'
825826

826827
Use the ``setPathSeparator()`` method on the config builder to change the path
@@ -831,7 +832,8 @@ separator::
831832
$treeBuilder->setPathSeparator('/');
832833
$node = $treeBuilder->buildTree();
833834
$children = $node->getChildren();
834-
$path = $children['driver']->getPath();
835+
$childChildren = $children['connection']->getChildren();
836+
$path = $childChildren['driver']->getPath();
835837
// $path = 'database/connection/driver'
836838

837839
Processing Configuration Values

0 commit comments

Comments
 (0)