Skip to content

Commit

Permalink
fix(textfield): exception while displaying counters
Browse files Browse the repository at this point in the history
text field with a null value cannot be HTML encoded
  • Loading branch information
btry committed Jun 21, 2023
1 parent ab1ceac commit 0a857d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/field/textfield.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function getValueForDesign(): string {
}

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

public function moveUploads() {
Expand Down

0 comments on commit 0a857d7

Please sign in to comment.