Skip to content

Commit aa7c1d0

Browse files
authored
FIX - When setComplexValue is not found
1 parent ec1b3d3 commit aa7c1d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/PhpWord/TemplateProcessor.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ public function setComplexValue($search, \PhpOffice\PhpWord\Element\AbstractElem
274274
$elementWriter->write();
275275

276276
$where = $this->findContainingXmlBlockForMacro($search, 'w:r');
277+
278+
if($where === false) {
279+
return ;
280+
}
281+
277282
$block = $this->getSlice($where['start'], $where['end']);
278283
$textParts = $this->splitTextIntoTexts($block);
279284
$this->replaceXmlBlock($search, $textParts, 'w:r');

0 commit comments

Comments
 (0)