Merge pull request #1936 from YannikFirre/patch-1

Add null check when setComplexValue is not found
This commit is contained in:
troosan 2021-02-05 21:26:02 +01:00 committed by GitHub
commit 8922632ead
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -278,6 +278,11 @@ class TemplateProcessor
$elementWriter->write();
$where = $this->findContainingXmlBlockForMacro($search, 'w:r');
if ($where === false) {
return;
}
$block = $this->getSlice($where['start'], $where['end']);
$textParts = $this->splitTextIntoTexts($block);
$this->replaceXmlBlock($search, $textParts, 'w:r');