PHPWord icon indicating copy to clipboard operation
PHPWord copied to clipboard

Tring to delete block surrounding table corrupts docx file

Open DPineault opened this issue 4 months ago • 1 comments

Describe the bug and add attachments

In my original docx file I have a series of table that I surrounded with

${block_name}${/block_name}

then in my code I try to delete the unused block. the minute this operation is performed the resulting file is corrupt and cannot be opened.

Expected behavior

we'd expect the table and variables to be deleted and the file to work properly.

Steps to reproduce

$templateProcessor->deleteBlock('table2');

PHPWord version(s) where the bug happened

1.3

PHP version(s) where the bug happened

7.4

Priority

  • [ ] I want to crowdfund the bug fix (with @algora-io) and fund a community developer.
  • [ ] I want to pay the bug fix and fund a maintainer for that. (Contact @Progi1984)

DPineault avatar Oct 11 '24 09:10 DPineault