PHPOffice/Common

DOMXPath::query(): Undefined namespace prefix

peter279k opened this issue · 4 comments

Test branch: develop.
Please consider the following error output:

PhpOffice\Common\Tests\XMLReaderTest::testShouldThrowExceptionIfNamespaceIsNotKnown
DOMXPath::query(): Undefined namespace prefix

And it seems that this test will be broken when executing the $this->xpath->query($path);.
Please see more details about this Travis build log.

Thanks.

That's strange, the test indeed checks that an exception is thrown.

expecting the following works, at least for php 7.2.

    /**
     * @expectedException PHPUnit_Framework_Error
     */

I'm not sure about other versions though

i don't know why i am facing the same issue. DOMXPath::query(): Undefined namespace prefix when i try to change .docx file to pdf file

Please help my guys.

is there any solution to this problem. Actually problems comes when there is any image in .docs file.