Skip to content

Commit 63bb428

Browse files
committed
fix(formanswer): handle null value when parsing tags
1 parent b80a96e commit 63bb428

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/formanswer.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ public function parseTags(string $content, PluginFormcreatorTargetInterface $tar
12171217
}
12181218
}
12191219
}
1220-
$content = str_replace('##answer_' . $questionId . '##', Sanitizer::sanitize($value), $content);
1220+
$content = str_replace('##answer_' . $questionId . '##', Sanitizer::sanitize($value ?? ''), $content);
12211221

12221222
if ($this->questionFields[$questionId] instanceof DropdownField) {
12231223
$content = $this->questionFields[$questionId]->parseObjectProperties($field->getValueForDesign(), $content);

0 commit comments

Comments
 (0)