|
18 | 18 |
|
19 | 19 | namespace PhpOffice\PhpWord; |
20 | 20 |
|
21 | | -use PhpOffice\PhpWord\Shared\ZipArchive; |
22 | | -use PhpOffice\PhpWord\Shared\XMLWriter; |
23 | | -use PhpOffice\PhpWord\Shared\Text; |
24 | | -use PhpOffice\PhpWord\Exception\Exception; |
25 | | -use PhpOffice\PhpWord\Exception\CreateTemporaryFileException; |
26 | | -use PhpOffice\PhpWord\Exception\CopyFileException; |
27 | | -use PhpOffice\PhpWord\Escaper\Xml; |
28 | 21 | use PhpOffice\PhpWord\Escaper\RegExp; |
| 22 | +use PhpOffice\PhpWord\Escaper\Xml; |
| 23 | +use PhpOffice\PhpWord\Exception\CopyFileException; |
| 24 | +use PhpOffice\PhpWord\Exception\CreateTemporaryFileException; |
| 25 | +use PhpOffice\PhpWord\Exception\Exception; |
| 26 | +use PhpOffice\PhpWord\Shared\Text; |
| 27 | +use PhpOffice\PhpWord\Shared\XMLWriter; |
| 28 | +use PhpOffice\PhpWord\Shared\ZipArchive; |
29 | 29 |
|
30 | 30 | class TemplateProcessor |
31 | 31 | { |
@@ -662,7 +662,7 @@ public function setImageValue($search, $replace, $limit = self::MAXIMUM_REPLACEM |
662 | 662 | if (preg_match('/(<[^<]+>)([^<]*)(' . preg_quote($varNameWithArgsFixed) . ')([^>]*)(<[^>]+>)/Uu', $partContent, $matches)) { |
663 | 663 | $wholeTag = $matches[0]; |
664 | 664 | array_shift($matches); |
665 | | - list($openTag, $prefix,, $postfix, $closeTag) = $matches; |
| 665 | + list($openTag, $prefix, , $postfix, $closeTag) = $matches; |
666 | 666 | $replaceXml = $openTag . $prefix . $closeTag . $xmlImage . $openTag . $postfix . $closeTag; |
667 | 667 | // replace on each iteration, because in one tag we can have 2+ inline variables => before proceed next variable we need to change $partContent |
668 | 668 | $partContent = $this->setValueForPart($wholeTag, $replaceXml, $partContent, $limit); |
@@ -1074,6 +1074,7 @@ protected function getNextRelationsIndex($documentPartName) |
1074 | 1074 | while (strpos($this->tempDocumentRelations[$documentPartName], 'Id="rId' . $candidate . '"') !== false) { |
1075 | 1075 | $candidate++; |
1076 | 1076 | } |
| 1077 | + |
1077 | 1078 | return $candidate; |
1078 | 1079 | } |
1079 | 1080 |
|
|
0 commit comments