Description
Describe the bug and add attachments
PHP Fatal error: Uncaught PhpOffice\Math\Exception\InvalidInputException: PhpOffice\Math\Reader\OfficeMathML::getElement : The tag m:r
has no tag m:t
defined in framework/library/vendor/phpoffice/math/src/Math/Reader/OfficeMathML.php:118
Stack trace:
#0 framework/library/vendor/phpoffice/math/src/Math/Reader/OfficeMathML.php(57): PhpOffice\Math\Reader\OfficeMathML->getElement(Object(DOMElement))
#1 framework/library/vendor/phpoffice/math/src/Math/Reader/OfficeMathML.php(42): PhpOffice\Math\Reader\OfficeMathML->parseNode(NULL, Object(PhpOffice\Math\Math))
#2 framework/library/vendor/phpoffice/phpword/src/PhpWord/Reader/Word2007/AbstractPart.php(271): PhpOffice\Math\Reader\OfficeMathML->read('<m:oMath><m:r><...')
#3 framework/library/vendor/phpoffice/phpword/src/PhpWord/Reader/Word2007/Document.php(150): PhpOffice\PhpWord\Reader\Word2007\AbstractPart->readParagraph(Object(PhpOffice\PhpWord\Shared\XMLReader), Object(DOMElement), Object(PhpOffice\PhpWord\Element\Section))
#4 framework/library/vendor/phpoffice/phpword/src/PhpWord/Reader/Word2007/Document.php(57): PhpOffice\PhpWord\Reader\Word2007\Document->readWPNode(Object(PhpOffice\PhpWord\Shared\XMLReader), Object(DOMElement), Object(PhpOffice\PhpWord\Element\Section))
#5 framework/library/vendor/phpoffice/phpword/src/PhpWord/Reader/Word2007.php(115): PhpOffice\PhpWord\Reader\Word2007\Document->read(Object(PhpOffice\PhpWord\PhpWord))
Expected behavior
it should run and have formulas in math ml and not give error
Steps to reproduce
$objReader = \PhpOffice\PhpWord\IOFactory::createReader('Word2007');
$phpWord = $objReader->load($filePath);
// Generate the HTML content
$htmlWriter = new HTML($phpWord);
$content = $htmlWriter->getContent();
PHPWord version(s) where the bug happened
"name": "phpoffice/phpword", "version": "1.3.0",
PHP version(s) where the bug happened
PHP 8.4.3
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)