php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76661 mb_convert_variables recursion detected
Submitted: 2018-07-25 01:07 UTC Modified: 2018-07-25 09:49 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: alldroll at gmail dot com Assigned:
Status: Verified Package: mbstring related
PHP Version: 7.2Git-2018-07-25 (Git) OS: no matter
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2018-07-25 01:07 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-07-25 09:48 UTC] cmb@php.net
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>
 [2018-07-25 09:49 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-07-25 23:42 UTC] alldroll at gmail dot com
can you make backport it to 7.2 ?
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Oct 16 03:01:25 2018 UTC