-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
I just import a docx and tried to export it to odt using PHPWord. At some point, I get this error:
PHP Warning: Division by zero in .../vendor/phpoffice/phpword/src/PhpWord/Writer/ODText/Style/Paragraph.php on line 40.
I investigated so the fact is that the document had a paragraph style where the getSpaceBefore method return the string "0", instead of NULL as expected. Indeed, this document is still valid for any text processor I tested, so it must be also for PHPWord.
I think the code could be improved using PHP transtyping feature to solve this issue. Simply replace is_null by ==0.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Metadata
Metadata
Assignees
Labels
No labels