Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children | af1871eacc83 |
line wrap: on
line diff
--- a/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/http-foundation/Session/Attribute/NamespacedAttributeBag.php Thu Feb 28 13:21:36 2019 +0000 @@ -110,21 +110,27 @@ } $parts = explode($this->namespaceCharacter, $name); - if (count($parts) < 2) { + if (\count($parts) < 2) { if (!$writeContext) { return $array; } - $array[$parts[0]] = array(); + $array[$parts[0]] = []; return $array; } - unset($parts[count($parts) - 1]); + unset($parts[\count($parts) - 1]); foreach ($parts as $part) { if (null !== $array && !array_key_exists($part, $array)) { - $array[$part] = $writeContext ? array() : null; + if (!$writeContext) { + $null = null; + + return $null; + } + + $array[$part] = []; } $array = &$array[$part];