php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #78462 Wrong return type for ArrayIterator::unserialize
Submitted: 2019-08-27 11:37 UTC Modified: 2019-09-01 09:16 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: fabien dot villepinte at gmail dot com Assigned: cmb (profile)
Status: Closed Package: SPL related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabien dot villepinte at gmail dot com
New email:
PHP Version: OS:

 

 [2019-08-27 11:37 UTC] 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)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-27 19:00 UTC] 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-09-01 09:16 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=347910
Log: Fix #78462: Wrong return type for ArrayIterator::unserialize
 [2019-09-01 09:16 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2019-09-01 09:16 UTC] cmb@php.net
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.
 [2019-09-01 09:20 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=a66054cdedb554506bea181de904dacde24f15f6
Log: Fix #78462: Wrong return type for ArrayIterator::unserialize
 [2020-02-07 06:04 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=04d92dac21ff3f9d2aee9a58da81b63d3f6fe70b
Log: Fix #78462: Wrong return type for ArrayIterator::unserialize
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Dec 02 04:01:24 2020 UTC