Skip to content

Commit 09becf1

Browse files
authored
Merge pull request #16 from Wikia/PLATFORM-10862-fix-dpl-blank-page
Fix Heading's attribute setters (hlistattr, hitemattr may be null)
2 parents 99a238f + d4b81bc commit 09becf1

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)