Bug #76661 [Opn]: mb_convert_variables recursion detected
| From: | cmb@php.net | Date: | Wed, 25 Jul 2018 09:48:44 +0000 |
| Subject: | Bug #76661 [Opn]: mb_convert_variables recursion detected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-216444@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76661&edit=1
ID: 76661
Updated by: cmb@php.net
Reported by: alldroll at gmail dot com
Summary: mb_convert_variables recursion detected
Status: Open
Type: Bug
Package: mbstring related
Operating System: no matter
PHP Version: 7.2Git-2018-07-25 (Git)
Block user comment: N
Private report: N
New Comment:
Confirmed: <https://3v4l.org/LK5DY>. Fixed for PHP 7.3
with
commit 45ee78e[1].
[1] <http://git.php.net/?p=php-src.git;a=commit;h=45ee78e>
Previous Comments:
------------------------------------------------------------------------
[2018-07-25 01:07:50] alldroll at gmail dot com
Description:
------------
Recursion detected on calling mb_convert_variables with nested array
Test script:
---------------
<?php
$test = array (
0 => array (
)
);
mb_convert_variables('utf-8', 'cp1251', $test);
var_dump($test);
mb_convert_variables('utf-8', 'utf-8', $test);
var_dump($test);
// here another example
for ($i = 0; $i < 2; ++$i) {
$test = array (
0 => array()
);
$data = json_decode(json_encode($test), 1);
mb_convert_variables('utf-8', 'cp1251', $data);
var_dump($data);
}
Expected result:
----------------
no error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76661&edit=1