#26639 [Opn->Csd]: array which mb_convert_variables does not specify is changed.
| From: | moriyoshi@php.net | Date: | Thu, 18 Dec 2003 09:49:24 +0000 |
| Subject: | #26639 [Opn->Csd]: array which mb_convert_variables does not specify is changed. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-52253@lists.php.net to get a copy of this message | ||
ID: 26639
Updated by: moriyoshi@php.net
Reported By: s dot masugata at digicom dot dnp dot co dot jp
-Status: Open
+Status: Closed
Bug Type: mbstring related
Operating System: Linux/Solaris(sparc)
PHP Version: 4.3.4
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-12-18 03:59:23] s dot masugata at digicom dot dnp dot co dot jp
Although tried on the snapshot(php4-STABLE-200312180630),
was still useless.
Since a result is the same, omits.
Before it, the portion of the code in question seems to
hardly be changed from PHP4.3.4.
I think it a problem to process as it is, without copying
array.
------------------------------------------------------------------------
[2003-12-18 03:13:34] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-12-16 06:45:23] s dot masugata at digicom dot dnp dot co dot jp
sorry, Actual result was wrong.
Actual result:
--------------
string(4) "no changed multi-byte string's"
string(3) "changed multi-byte string's"
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
------------------------------------------------------------------------
[2003-12-16 06:42:46] s dot masugata at digicom dot dnp dot co dot jp
Description:
------------
Array which mb_convert_variables does not specify is
changed.
I think that this operation is not specification but
a bug with it being individual.
Isn't it changed about this operation by PHP4.3.5 or
it or later?
Reproduce code:
---------------
<?
// no problem.
$Str1 = "multi-byte string's";
$Str2 = $Str1;
mb_convert_variables( "SJIS",
mb_detect_order( ),
$Str2 );
var_dump( $Str1 );
var_dump( $Str2 );
// unexpected operation.
$Array1 = array( "multi-byte string's" );
$Array2 = $Array1;
mb_convert_variables( "SJIS",
mb_detect_order( ),
$Array2 );
var_dump( $Array1 );
var_dump( $Array2 );
?>
Expected result:
----------------
string(4) "no changed multi-byte string's"
string(3) "changed multi-byte string's"
array(1) {
[0]=>
string(3) "no changed multi-byte string's"
}
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
Actual result:
--------------
string(4) "no changed multi-byte string's"
string(3) "changed multi-byte string's"
array(1) {
[0]=>
string(4) "no changed multi-byte string's"
}
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
string(4) "no changed multi-byte string's"
string(3) "changed multi-byte string's"
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
array(1) {
[0]=>
string(3) "changed multi-byte string's"
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26639&edit=1