diff --git a/core/lib/Drupal/Core/Config/ConfigBase.php b/core/lib/Drupal/Core/Config/ConfigBase.php index 2999b76..b0db1b6 100644 --- a/core/lib/Drupal/Core/Config/ConfigBase.php +++ b/core/lib/Drupal/Core/Config/ConfigBase.php @@ -176,6 +176,8 @@ public function setData(array $data) { * @param array $data * Configuration array structure. * + * @return null + * * @throws \Exception * If any key in $data in any depth contains a dot. */ @@ -200,10 +202,16 @@ protected function validateKeys(array $data) { * * @return $this * The configuration object. + * + * @throws \Exception + * If $value is an array and any of its keys in any depth contains a dot. */ public function set($key, $value) { // The dot/period is a reserved character; it may appear between keys, but // not within keys. + if (is_array($value)) { + $this->validateKeys($value); + } $parts = explode('.', $key); if (count($parts) == 1) { $this->data[$key] = $value;