PHPOffice / PHPWord

A pure PHP library for reading and writing word processing documents
https://phpoffice.github.io/PHPWord/
Other
7.29k stars 2.7k forks source link

Exception 'TypeError' with message 'Unsupported operand types: string * int' with line-height: inherit #2683

Open Zae opened 2 months ago

Zae commented 2 months ago

Describe the bug and add attachments

It appear that whenever line-height: inherit; is used in an inline style attribute, phpword crashes with the error: Exception 'TypeError' with message 'Unsupported operand types: string * int'

Expected behavior

phpWord to not crash with a TypeError

Steps to reproduce

<div>
    <div style="line-height:inherit;">
    </div>
</div>
Html::addHtml($section, $content);

PHPWord version(s) where the bug happened

1.3.0

PHP version(s) where the bug happened

8.1.2

Priority