Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
fix empty attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolineus committed Jun 16, 2014
1 parent 79620c5 commit 817a3ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Netzmacht/Bootstrap/Helper/Buttons.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ protected function addItemToTarget(array &$target, array $item, $first=false, $c
$attributes = '';

foreach($item['attributes'] as $attribute) {
// do not assign empty attributes
if($attribute['name'] == '') {
continue;
}

if($attribute['name'] == 'class' && !isset($item['class'])) {
$item['class'] = $attribute ['value'];
continue;
Expand Down

0 comments on commit 817a3ef

Please sign in to comment.