php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #51721 Patch: mark DOMNodeList and DOMNamedNodeMap as Traversable
Submitted: 2010-05-02 13:03 UTC Modified: 2010-05-04 14:56 UTC
Votes:10
Avg. Score:5.0 ± 0.0
Reproduced:10 of 10 (100.0%)
Same Version:10 (100.0%)
Same OS:10 (100.0%)
From: david dot zuelke at bitextender dot com Assigned: rrichards
Status: Closed Package: DOM XML related
PHP Version: 5.3.2 OS: Mac OS X 10.5.8
Private report: No CVE-ID:
 [2010-05-02 13:03 UTC] david dot zuelke at bitextender dot com
Description:
------------
DOMNodeList and DOMNamedNodeMap do not implement the interface Traversable even 
though they can be iterated over just fine. Minor fix. Patch attached.

Test script:
---------------
<?php

var_dump((new DOMNodeList) instanceof Traversable, (new DOMNamedNodeMap) instanceof Traversable);

?>

Expected result:
----------------
bool(true)
bool(true)


Actual result:
--------------
bool(false)
bool(false)


Patches

Traversable_DOMNodeList_DOMNamedNodeMap (last revision 2010-05-02 15:57 UTC) by david dot zuelke at bitextender dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-04 14:55 UTC] rrichards@php.net
Automatic comment from SVN on behalf of rrichards
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=298967
Log: fix bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable)
 [2010-05-04 14:56 UTC] rrichards@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: rrichards
 [2010-05-04 14:56 UTC] rrichards@php.net
This bug has been fixed in SVN.

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-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 09:02:23 2014 UTC