Skip to content

Commit 3177b84

Browse files
author
Mikaël Capelle
committed
Correct duplicate attribute bug. See issue #69.
1 parent 6046ff6 commit 3177b84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/View/BootstrapStringTemplate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function format($name, array $data)
5151
if (substr($placeholder, 0, 6) == 'attrs.'
5252
&& in_array('attrs.'.substr($placeholder, 6), $placeholders)
5353
&& preg_match('#'.substr($placeholder, 6).'="([^"]+)"#', $data['attrs'], $matches) > 0) {
54-
preg_replace('#'.substr($placeholder, 6).'="[^"]+"#', '', $data['attrs']);
54+
$data['attrs'] = preg_replace('#'.substr($placeholder, 6).'="[^"]+"#', '', $data['attrs']);
5555
$data[$placeholder] = $matches[1];
5656
}
5757
}

0 commit comments

Comments
 (0)