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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: adam at trachtenberg dot com
New email:
PHP Version: OS:

 

 [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: Wed Apr 24 15:01:30 2024 UTC