PHPWord
                                
                                 PHPWord copied to clipboard
                                
                                    PHPWord copied to clipboard
                            
                            
                            
                        Generate Table Cell if Row Doesn't Have Any
Description
Fix #2505. Word treats file as corrupt if a table row does not contain a cell (documentation for why this is so is included in the issue). Person reporting the issue suggests that dropping such a row from the output file is preferred. However, I think generating an empty cell instead is closer to the user's expectation. For example, as demonstrated in the unit tests added with this PR, if a table has row 1 and 3 which contain cells, but row 2 does not, the table as written to the file will have 3 rows, with the second containing an empty cell.
Checklist:
- [x] I have run composer run-script check --timeout=0and no errors were reported
- [x] The new code is covered by unit tests (check build/coverage for coverage report)
- [ ] I have updated the documentation to describe the changes
coverage: 97.209% (+0.001%) from 97.208% when pulling 054d0d019bea9523d9f4726125d3eb744425ec39 on oleibman:word2505b into 2daa50c6f34c9cb6c532f72350e4bd8d466d6c71 on PHPOffice:master.
Hi @oleibman , tested locally and LGTM. Thank you.
@Progi1984 Change log updated, all your suggestions except one are incorporated; that one needs further discussion,