diff --git a/core/lib/Drupal/Core/Template/Attribute.php b/core/lib/Drupal/Core/Template/Attribute.php index deeb549..f42ee32 100644 --- a/core/lib/Drupal/Core/Template/Attribute.php +++ b/core/lib/Drupal/Core/Template/Attribute.php @@ -164,23 +164,20 @@ public function addClass() { * Adds attribute or merges values on to array of existing attribute values. * * @param string $attribute - * Name of the Attribute. + * Name of the attribute. * @param string|array $value * Value(s) to add or merge to the given attribute. * * @return $this */ public function setAttribute($attribute, $value) { - // If attribute key exists we can set attribute. - if ($attribute) { $this->offsetSet($attribute, $value); - } return $this; } /** - * Removes argument from array of existing attributes. + * Removes an attribute from an Attribute object. * * @param string|array ... * Attributes to remove from the attribute array.