Doc #78462 [Opn->Csd]: Wrong return type for ArrayIterator::unserialize
| From: | cmb@php.net | Date: | Sun, 01 Sep 2019 09:16:57 +0000 |
| Subject: | Doc #78462 [Opn->Csd]: Wrong return type for ArrayIterator::unserialize | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-16918@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78462&edit=1
ID: 78462
Updated by: cmb@php.net
Reported by: fabien dot villepinte at gmail dot com
Summary: Wrong return type for ArrayIterator::unserialize
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: SPL related
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation better.
Previous Comments:
------------------------------------------------------------------------
[2019-09-01 09:16:27] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=347910
Log: Fix #78462: Wrong return type for ArrayIterator::unserialize
------------------------------------------------------------------------
[2019-08-27 19:00:28] henry dot paradiz at gmail dot com
Me too!
Please feel free to email me with the updates when they are released. I noticed this problem a few
days ago, as well.
henry.paradiz@gmail.com
------------------------------------------------------------------------
[2019-08-27 11:37:21] fabien dot villepinte at gmail dot com
Description:
------------
There is a mistake in the documentation of ArrayIterator::unserialize about the return type.
It should be void instead of string.
The 'Return Values' should also be updated accordingly.
See: https://www.php.net/manual/en/arrayiterator.unserialize.php
Test script:
---------------
<?php
$a = new ArrayIterator();
var_dump($a->unserialize(
(new ArrayIterator([1, 2, 3]))->serialize()
));
foreach ($a as $e) {
var_dump($e);
}
Expected result:
----------------
NULL
int(1)
int(2)
int(3)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78462&edit=1