php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73322 mb_convert_variables detects recursive reference incorrectly
Submitted: 2016-10-14 14:48 UTC Modified: 2020-12-18 13:58 UTC
Votes:17
Avg. Score:4.5 ± 0.8
Reproduced:15 of 16 (93.8%)
Same Version:6 (40.0%)
Same OS:5 (33.3%)
From: townwear at gmail dot com Assigned: yohgaki (profile)
Status: Closed Package: mbstring related
PHP Version: Irrelevant OS: Irrelevant
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: townwear at gmail dot com
New email:
PHP Version: OS:

 

 [2016-10-14 14:48 UTC] townwear at gmail dot com
Description:
------------
PHP-7.0.11 is no problem.
$ php -r '$x = ["a", "b"]; mb_convert_variables("UTF-8", "SJIS,EUC-JP", $x);'
// no output


PHP-7.0.12 is problem.
$ php -r '$x = ["a", "b"]; mb_convert_variables("UTF-8", "SJIS,EUC-JP", $x);'
PHP Warning:  mb_convert_variables(): Cannot handle recursive references in Command line code on line 1

Warning: mb_convert_variables(): Cannot handle recursive references in Command line code on line 1

Test script:
---------------
$ php -r '$x = ["a", "b"]; mb_convert_variables("UTF-8", "SJIS,EUC-JP", $x);'

Expected result:
----------------
// no output

Actual result:
--------------
PHP Warning:  mb_convert_variables(): Cannot handle recursive references in Command line code on line 1

Warning: mb_convert_variables(): Cannot handle recursive references in Command line code on line 1

Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-14 15:57 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: yohgaki
 [2016-10-14 15:57 UTC] cmb@php.net
Confirmed: <https://3v4l.org/IA2Cp#v7012>. The regression has
been introduced by fixing bug #66964.

Yasuo, can you please have a look at this issue.
 [2016-10-14 23:36 UTC] yohgaki@php.net
-Status: Verified +Status: Assigned -Operating System: CentOS7 +Operating System: Irrelevant -PHP Version: 7.0.12 +PHP Version: Irrelevant
 [2016-10-14 23:36 UTC] yohgaki@php.net
The code has obvious issue...
I'll fix it.
 [2016-10-15 01:07 UTC] yohgaki@php.net
-Summary: mb_convert_variables is problem +Summary: mb_convert_variables detects recursive reference incorrectly
 [2016-10-16 03:07 UTC] yohgaki@php.net
PR is made. PHP 5.6 has some issues also, but I would like to leave 5.6 as it is now.
 [2016-12-19 14:46 UTC] msangapu at microsoft dot com
Hello, we have customers on MS Azure using 5.6.28 and facing these warnings. I see from the comments that this will be fixed in PHP 7.x. Can you please pull this fix into 5.6.x branch as well?
 [2020-12-18 13:58 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2020-12-18 13:58 UTC] cmb@php.net
According to <https://3v4l.org/IA2Cp#v7012> this is fixed as of
PHP 7.3.0.  Older versions are out of active support for quite
some time now, so the fix will not be backported.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC