Skip to content

Commit 0a857d7

Browse files
committed
fix(textfield): exception while displaying counters
text field with a null value cannot be HTML encoded
1 parent ab1ceac commit 0a857d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/field/textfield.class.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function getValueForDesign(): string {
108108
}
109109

110110
public function getValueForTargetText($domain, $richText): ?string {
111-
return Sanitizer::encodeHtmlSpecialChars($this->value);
111+
return Sanitizer::encodeHtmlSpecialChars($this->value ?? '');
112112
}
113113

114114
public function moveUploads() {

0 commit comments

Comments
 (0)