FIX - When setComplexValue is not found

This commit is contained in:
Yannik Firre 2020-09-22 16:28:52 +02:00 committed by GitHub
parent ec1b3d35ee
commit aa7c1d0fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

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