Skip to content
Snippets Groups Projects

added test and fix

7 unresolved threads
Files
2
@@ -94,6 +94,13 @@ public function offsetGet($name): mixed {
if (isset($this->storage[$name])) {
return $this->storage[$name];
}
// The 'class' array key is expected to be itself an array, and therefore
// can be accessed using array append syntax before it has been initialized.
if ($name === 'class') {
Please register or sign in to reply
// Initialize the class attribute as an empty array if not set.
$this->offsetSet('class', []);
return $this->storage['class'];
}
return NULL;
}
Loading