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: 2021-02-01 14:55 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: alldroll at gmail dot com Assigned: cmb (profile)
Status: Closed Package: mbstring related
PHP Version: 7.2Git-2018-07-25 (Git) OS: no matter
Private report: No CVE-ID: None
 [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

Pull Requests

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 ?
 [2021-02-01 14:55 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-02-01 14:55 UTC] cmb@php.net
> can you make backport it to 7.2 ?

No, since PHP-7.2 is no longer maintained at all.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 04:01:29 2024 UTC