8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c790f9 commit 10a8911Copy full SHA for 10a8911
src/Symfony/Component/Config/Definition/BaseNode.php
@@ -42,9 +42,15 @@ abstract class BaseNode implements NodeInterface
42
* @param string $name The name of the node
43
* @param NodeInterface $parent The parent of this node
44
* @param string $pathSeparator The Path Separator that is used
45
+ *
46
+ * @throws \InvalidArgumentException if the name contains path separator
47
*/
48
public function __construct($name, NodeInterface $parent = null, $pathSeparator = self::DEFAULT_PATH_SEPARATOR)
49
{
50
+ if (false !== strpos($name, $pathSeparator)) {
51
+ throw new \InvalidArgumentException('The name must not contain "'.$pathSeparator.'".');
52
+ }
53
+
54
$this->name = $name;
55
$this->parent = $parent;
56
$this->pathSeparator = $pathSeparator;
0 commit comments