Skip to content

Commit d4b81bc

Browse files
alex4401wladekb
authored andcommitted
Fix Heading's attribute setters (hlistattr, hitemattr may be null) (Universal-Omega#320)
Fixes Universal-Omega#319.
1 parent 99a238f commit d4b81bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

includes/Heading/Heading.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,19 +131,19 @@ public function getParameters() {
131131
/**
132132
* Set extra list attributes.
133133
*
134-
* @param string $attributes
134+
* @param ?string $attributes
135135
*/
136136
public function setListAttributes( $attributes ) {
137-
$this->listAttributes = Sanitizer::fixTagAttributes( $attributes, 'ul' );
137+
$this->listAttributes = Sanitizer::fixTagAttributes( $attributes ?: '', 'ul' );
138138
}
139139

140140
/**
141141
* Set extra item attributes.
142142
*
143-
* @param string $attributes
143+
* @param ?string $attributes
144144
*/
145145
public function setItemAttributes( $attributes ) {
146-
$this->itemAttributes = Sanitizer::fixTagAttributes( $attributes, 'li' );
146+
$this->itemAttributes = Sanitizer::fixTagAttributes( $attributes ?: '', 'li' );
147147
}
148148

149149
/**

0 commit comments

Comments
 (0)