#26849 [Opn->Csd]: domXPath object returns array instead of nodeList

From: Date: Sat, 10 Jan 2004 11:47:39 +0000
Subject: #26849 [Opn->Csd]: domXPath object returns array instead of nodeList
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-53051@lists.php.net to get a copy of this message
ID: 26849 Updated by: rrichards@php.net Reported By: adam at trachtenberg dot com -Status: Open +Status: Closed Bug Type: DOM XML related Operating System: * PHP Version: 5CVS-2004-01-08 (dev) New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2004-01-08 16:22:53] adam at trachtenberg dot com That should be domXpath::query(), but you get the point. :) ------------------------------------------------------------------------ [2004-01-08 16:18:28] 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) { ... } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26849&edit=1

« previous php.bugs (#53051) next »