Bug #17629: DomDocument->get_element_by_id still broken
| From: | bigredlinux at yahoo dot com | Date: | Thu, 06 Jun 2002 18:01:19 +0000 |
| Subject: | Bug #17629: DomDocument->get_element_by_id still broken | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-9657@lists.php.net to get a copy of this message | ||
From: bigredlinux@yahoo.com
Operating system: linux redhat 7.2
PHP version: 4.2.1
PHP Bug Type: DOM XML related
Bug description: DomDocument->get_element_by_id still broken
Reopening this bug. I understand that the function should use the id hash
as built from reading the DTD, which this function now attempts to do.
However, now the result of get_element_by_id is NULL
Here is the output running the bleeding edge version of domxml from the
following code:
output: NULL
code:
<?php
$string = <<< _END
<!DOCTYPE html [ <!ATTLIST span id ID #REQUIRED> ]>
<html>
<head><title> Test </title></head>
<body>
<h1>Test</h1>
<span id="test">Foo</span>
</body>
</html>
_END;
$xml = domxml_open_mem($string);
$n = $xml->get_element_by_id("test");
var_dump($n);
?>
Clearly something is happening. If I run $xml->ids() I get an array of
one domnode, just as I would expect.
--
Edit bug report at http://bugs.php.net/?id=17629&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17629&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17629&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17629&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17629&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17629&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17629&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17629&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17629&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17629&r=globals