Skip to content
Snippets Groups Projects

Issue #3334045 by yash.rode, joachim, quietone: Drupal\Core\Template\Attribute...

Closed Stephen Mustgrave requested to merge issue/drupal-3334045:3334045-backport-10.5 into 10.5.x
2 files
+ 13
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -95,6 +95,13 @@ public function offsetGet($name) {
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') {
// Initialize the class attribute as an empty array if not set.
$this->offsetSet('class', []);
return $this->storage['class'];
}
}
/**
Loading