|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-04-02 12:13 UTC] rrichards@php.net
-Status: Open
+Status: Bogus
[2010-04-02 12:13 UTC] rrichards@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 10:00:01 2025 UTC |
Description: ------------ The getLineNo() method exists for DOMText but doesn't work correctly; it always returns 0. Test script: --------------- <?php $xml = <<<EOF <foo> <bar>baz</bar> </foo> EOF; $doc = new DOMDocument(); $doc->loadXML( $xml ); $text = $doc->documentElement->firstChild->nextSibling->firstChild; echo get_class( $text ) . ' : ' . $text->data . ' : ' . $text->getLineNo() . "\n"; ?> Expected result: ---------------- DOMText : baz : 2 Actual result: -------------- DOMText : baz : 0