Bug #67360 [Csd]: Missing element after ArrayObject::getIterator
| From: | im dot samuray at gmail dot com | Date: | Fri, 30 May 2014 10:38:09 +0000 |
| Subject: | Bug #67360 [Csd]: Missing element after ArrayObject::getIterator | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-185985@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67360&edit=1
ID: 67360
User updated by: im dot samuray at gmail dot com
Reported by: im dot samuray at gmail dot com
Summary: Missing element after ArrayObject::getIterator
Status: Closed
Type: Bug
Package: SPL related
Operating System: debian 7
PHP Version: 5.5.12
Assigned To: aharvey
Block user comment: N
Private report: N
New Comment:
Thanks!
Previous Comments:
------------------------------------------------------------------------
[2014-05-29 17:59:17] aharvey@php.net
https://github.com/php/php-src/commit/b5d9983ff4373793621ee4b21d4964b30c5d21c8,
for the record.
------------------------------------------------------------------------
[2014-05-29 17:58:25] aharvey@php.net
The fix for this bug has been committed.
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/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2014-05-29 16:54:59] im dot samuray at gmail dot com
Description:
------------
Actually latest stable php i have is:
PHP 5.5.10-1~dotdeb.1 (cli) (built: Mar 6 2014 18:55:59)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with XCache v3.1.0, Copyright (c) 2005-2013, by mOo
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
with Xdebug v2.2.4, Copyright (c) 2002-2014, by Derick Rethans
with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo
Error ilustrated in test script (BTW: checked in hhvm 3.1 - works as expected)
Test script:
---------------
$array = array('' => 1, 1 => 2, 3 => 4);
$ArrayObject = new ArrayObject($array);
$Iterator = $ArrayObject->getIterator();
var_dump(count($Iterator) === count($array));
//outputs false, but must be true
var_dump(iterator_to_array($Iterator));
//element '' => 1 is missing
Expected result:
----------------
count($Iterator) === count($array) must be true
Actual result:
--------------
count($Iterator) === count($array) is false
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67360&edit=1