Skip to content

Commit

Permalink
fix(formanswer): handle null value when parsing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jul 18, 2022
1 parent b80a96e commit 63bb428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1217,7 +1217,7 @@ public function parseTags(string $content, PluginFormcreatorTargetInterface $tar
}
}
}
$content = str_replace('##answer_' . $questionId . '##', Sanitizer::sanitize($value), $content);
$content = str_replace('##answer_' . $questionId . '##', Sanitizer::sanitize($value ?? ''), $content);

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

0 comments on commit 63bb428

Please sign in to comment.