Commit 6a168b0d authored by webchick's avatar webchick

Issue #2326397 by davidhernandez: Fixed Add filtering to AttributeArray.

parent 584911ae
......@@ -66,6 +66,8 @@ public function offsetExists($offset) {
* Implements the magic __toString() method.
*/
public function __toString() {
// Filter out any empty values before printing.
$this->value = array_filter($this->value);
return String::checkPlain(implode(' ', $this->value));
}
......
......@@ -178,6 +178,8 @@ public function providerTestAttributeClassHelpers() {
'himalchuli annapurna-ii',
array('class' => array('himalchuli', 'nuptse')),
),
// Test for the removal of an empty class name.
array("{{ attributes.addClass('rakaposhi', '').class }}", 'rakaposhi'),
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment