php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26849 domXPath object returns array instead of nodeList
Submitted: 2004-01-08 16:18 UTC Modified: 2004-01-10 06:47 UTC
From: adam at trachtenberg dot com Assigned:
Status: Closed Package: DOM XML related
PHP Version: 5CVS-2004-01-08 (dev) OS: *
Private report: No CVE-ID: None
 [2004-01-08 16:18 UTC] adam at trachtenberg dot com
Description:
------------
The domXPath object still returns nodes in an array 
instead of as a nodeList object.

Reproduce code:
---------------
$dom = new domDocument::load($xml);
$xpath = new domXPath($dom);
$results = $xpath->query('/');
var_dump($results);

Expected result:
----------------
object(domnodelist)#14 (0) {
 ...
}

Actual result:
--------------
array(1) {
 ...
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-08 16:22 UTC] adam at trachtenberg dot com
That should be domXpath::query(), but you get the point. 
:)
 [2004-01-10 06:47 UTC] rrichards@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC