(bug 39875) Fixed conversion of array attributes in Html.
Changed Html::dropDefaults() so that when an array is passed as an attribute value, it does not call strval(), thus triggering a PHP notice. Instead arrays are imploded with a space as the separator. Change-Id: I2521b78c7de94c183b7de7e7d4b2b510ab0c7770
This commit is contained in:
parent
7fae5812cd
commit
f34547ab44
1 changed files with 5 additions and 1 deletions
|
|
@ -325,7 +325,11 @@ class Html {
|
|||
|
||||
foreach ( $attribs as $attrib => $value ) {
|
||||
$lcattrib = strtolower( $attrib );
|
||||
$value = strval( $value );
|
||||
if( is_array( $value ) ) {
|
||||
$value = implode( ' ', $value );
|
||||
} else {
|
||||
$value = strval( $value );
|
||||
}
|
||||
|
||||
# Simple checks using $attribDefaults
|
||||
if ( isset( $attribDefaults[$element][$lcattrib] ) &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue