mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-25 12:19:11 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -110,7 +110,7 @@ class NamespacedAttributeBag extends AttributeBag
|
||||
}
|
||||
|
||||
$parts = explode($this->namespaceCharacter, $name);
|
||||
if (count($parts) < 2) {
|
||||
if (\count($parts) < 2) {
|
||||
if (!$writeContext) {
|
||||
return $array;
|
||||
}
|
||||
@@ -120,11 +120,17 @@ class NamespacedAttributeBag extends AttributeBag
|
||||
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 = &$array[$part];
|
||||
|
||||
Reference in New Issue
Block a user