File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/Symfony/Component/Config/Definition Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,15 @@ abstract class BaseNode implements NodeInterface
42
42
* @param string $name The name of the node
43
43
* @param NodeInterface $parent The parent of this node
44
44
* @param string $pathSeparator The Path Separator that is used
45
+ *
46
+ * @throws \InvalidArgumentException if the name contains path separator
45
47
*/
46
48
public function __construct ($ name , NodeInterface $ parent = null , $ pathSeparator = self ::DEFAULT_PATH_SEPARATOR )
47
49
{
50
+ if (false !== strpos ($ name , $ pathSeparator )) {
51
+ throw new \InvalidArgumentException ('The name must not contain " ' .$ pathSeparator .'". ' );
52
+ }
53
+
48
54
$ this ->name = $ name ;
49
55
$ this ->parent = $ parent ;
50
56
$ this ->pathSeparator = $ pathSeparator ;
You can’t perform that action at this time.
0 commit comments