Skip to content

Commit 42bcb97

Browse files
committed
Prevent array to string conversion
1 parent e44a689 commit 42bcb97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

includes/CMB2_Utils.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ public static function concat_attrs( $attrs, $attr_exclude = array() ) {
589589
foreach ( $attrs as $attr => $val ) {
590590
$excluded = in_array( $attr, (array) $attr_exclude, true );
591591
$empty = false === $val && 'value' !== $attr;
592+
$val = is_array( $val ) ? implode( ',', $val ) : $val;
592593
if ( ! $excluded && ! $empty ) {
593594
// if data attribute, use single quote wraps, else double.
594595
$quotes = self::is_data_attribute( $attr, 'data-' ) ? "'" : '"';

0 commit comments

Comments
 (0)