RecursiveArrayIterator does not implement Countable
| Bug #62262 | RecursiveArrayIterator does not implement Countable | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2012-06-08 09:05 UTC | Modified: | 2012-06-19 16:47 UTC |
|
||||||||||
| From: | gen dot work at gmail dot com | Assigned: | nikic (profile) | |||||||||||
| Status: | Closed | Package: | SPL related | |||||||||||
| PHP Version: | 5.3.13 | OS: | Windows XP, Ubuntu 10.04 | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2012-06-08 09:05 UTC] gen dot work at gmail dot com
Description: ------------ The RecursiveArrayIterator class does not implement Countable interface, although it extends ArrayIterator. Test script: --------------- $it = new \ArrayIterator(array(1, 2, 3)); $rit = new \RecursiveArrayIterator($it); var_dump($it instanceof \Countable); var_dump($rit instanceof \Countable); Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(true) bool(false)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2012-06-08 23:34 UTC] nikic@php.net
-Status: Open +Status: Verified
[2012-06-19 16:47 UTC] nikic@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: nikic