Skip to content

Commit

Permalink
fix concerning issues with text boxes being interpreted as images
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasvielmetter committed Sep 26, 2017
1 parent e2f1da2 commit 4b34511
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/WrkLst/DocxMustache/DocxMustache.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ protected function InsertImages($ns, &$imgs, &$rels_file, &$main_file)
$sxe->addAttribute('Target', 'media/'.$imgs[$k]['img_file_dest']);

foreach ($main_file->xpath('//w:drawing') as $k=>$drawing) {
if ($img['id'] == $main_file->xpath('//w:drawing')[$k]->children($ns['wp'])->children($ns['a'])
if (null !== $main_file->xpath('//w:drawing')[$k]->children($ns['wp'])->children($ns['a'])
->graphic->graphicData->children($ns['pic'])->pic->blipFill &&
$img['id'] == $main_file->xpath('//w:drawing')[$k]->children($ns['wp'])->children($ns['a'])
->graphic->graphicData->children($ns['pic'])->pic->blipFill->children($ns['a'])
->blip->attributes($ns['r'])['embed']) {
$main_file->xpath('//w:drawing')[$k]->children($ns['wp'])->children($ns['a'])
Expand Down

0 comments on commit 4b34511

Please sign in to comment.