From:             s dot masugata at digicom dot dnp dot co dot jp
Operating system: FreeBSD/Linux/Solaris(sparc)
PHP version:      4.3.6
PHP Bug Type:     mbstring related
Bug description:  mb_convert_variables() clutters variables beyond the references, 
again.

Description:
------------
See:http://bugs.php.net/bug.php?id=26639

Although the usual array is satisfactory, 
if array becomes a nest, it is still useless.


Reproduce code:
---------------
<?
// no problem.
$Array1  = array( "multi-byte string's" );
$Array2  = $Array1;

mb_convert_variables( "SJIS",
                      mb_detect_order( ),
                      $Array2 );

var_dump( $Array1 );
var_dump( $Array2 );

// unexpected operation.
$Array1  = array( "multi-byte string's", array( "multi-byte string's" )
);
$Array2  = $Array1;

mb_convert_variables( "SJIS",
                      mb_detect_order( ),
                      $Array2 );

var_dump( $Array1 );
var_dump( $Array2 );
?>

Expected result:
----------------
array(1) {
  [0]=>
  string(3) "no changed multi-byte string's"
}

array(1) {
  [0]=>
  string(3) "changed multi-byte string's"
}

array(1) {
  [0]=>
  string(3) "no changed multi-byte string's"
  [1]=>
   array(1) {
     [0]=>
     string(4) "no changed multi-byte string's"
   }
}

array(1) {
  [0]=>
  string(3) "changed multi-byte string's"
  [1]=>
   array(1) {
     [0]=>
     string(4) "changed multi-byte string's"
   }
}


Actual result:
--------------
array(1) {
  [0]=>
  string(3) "no changed multi-byte string's"
}

array(1) {
  [0]=>
  string(3) "changed multi-byte string's"
}

array(1) {
  [0]=>
  string(3) "no changed multi-byte string's"
  [1]=>
   array(1) {
     [0]=>
     string(4) "changed  multi-byte string's"
   }
}

array(1) {
  [0]=>
  string(3) "changed multi-byte string's"
  [1]=>
   array(1) {
     [0]=>
     string(4) "changed multi-byte string's"
   }
}


-- 
Edit bug report at http://bugs.php.net/?id=28466&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28466&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28466&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28466&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28466&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28466&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28466&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28466&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28466&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28466&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28466&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28466&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28466&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28466&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28466&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28466&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28466&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28466&r=float

Reply via email to